summary refs log tree commit diff stats
path: root/tests/tuples
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2020-07-07 10:21:18 +0200
committerGitHub <noreply@github.com>2020-07-07 10:21:18 +0200
commit5bd2da3f6461ef4dbcfd1f0c35178fa8fa9b5368 (patch)
treedb6995ea3847b0f8533ef0b101f0c0e824450b4f /tests/tuples
parentebd97884a0134ba2f88e19f647585aa6133536aa (diff)
downloadNim-5bd2da3f6461ef4dbcfd1f0c35178fa8fa9b5368.tar.gz
Fix #14911 (#14922) [backport]
* Fix #14911

* Add testcase

* Fix test
Diffstat (limited to 'tests/tuples')
-rw-r--r--tests/tuples/ttuples_issues.nim9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/tuples/ttuples_issues.nim b/tests/tuples/ttuples_issues.nim
index 9380bd027..f294f2f1c 100644
--- a/tests/tuples/ttuples_issues.nim
+++ b/tests/tuples/ttuples_issues.nim
@@ -1,5 +1,7 @@
 discard """
-output: '''
+output: '''(a: 1)
+(a: 1)
+(a: 1, b: 2)
 '''
 """
 
@@ -75,3 +77,8 @@ block t1986:
     (var1: test(), var2: 100'u32),
     (var1: test(), var2: 192'u32)
   ]
+
+# bug #14911
+echo (a: 1)  # works
+echo (`a`: 1)  # works
+echo (`a`: 1, `b`: 2)  # Error: named expression expected