mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-17 14:31:15 +00:00
* fix #19149 Invalid codegen when returning var tuple from a template
* fix type
(cherry picked from commit bae0fb720a)
This commit is contained in:
19
tests/template/t19149.nim
Normal file
19
tests/template/t19149.nim
Normal file
@@ -0,0 +1,19 @@
|
||||
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()
|
||||
|
||||
Reference in New Issue
Block a user