Files
Nim/tests/template/t19149.nim
Bung bae0fb720a fix #19149 Invalid codegen when returning var tuple from a template (#20762)
* fix #19149 Invalid codegen when returning var tuple from a template

* fix type
2022-11-06 11:49:34 +01:00

20 lines
246 B
Nim

type Foo = tuple[active: bool, index: int]
var f: Foo
# template result type during match stage
# f:var Foo
# a:Foo
# tyVar
# tyTuple
# after change to proc
# f:Foo
# a:Foo
# tyTuple
# tyTuple
template cursor(): var Foo = f
discard cursor()