Fixed const tuples in inferred generics (#18598)
This commit is contained in:
parent
fa0209609d
commit
ed44618deb
2 changed files with 30 additions and 17 deletions
14
tests/tuples/tinferred_generic_const.nim
Normal file
14
tests/tuples/tinferred_generic_const.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
discard """
|
||||
action: run
|
||||
"""
|
||||
block:
|
||||
proc something(a: string or int or float) =
|
||||
const (c, d) = (default a.type, default a.type)
|
||||
|
||||
block:
|
||||
proc something(a: string or int) =
|
||||
const c = default a.type
|
||||
|
||||
block:
|
||||
proc something(a: string or int) =
|
||||
const (c, d, e) = (default a.type, default a.type, default a.type)
|
||||
Loading…
Add table
Add a link
Reference in a new issue