summary refs log tree commit diff stats
path: root/tests/template/t19149.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/template/t19149.nim')
-rw-r--r--tests/template/t19149.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/template/t19149.nim b/tests/template/t19149.nim
new file mode 100644
index 000000000..631e8fc30
--- /dev/null
+++ b/tests/template/t19149.nim
@@ -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()
+