summary refs log tree commit diff stats
path: root/tests/tuples
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tuples')
-rw-r--r--tests/tuples/tanontuples.nim7
-rw-r--r--tests/tuples/tdifferent_instantiations.nim9
2 files changed, 10 insertions, 6 deletions
diff --git a/tests/tuples/tanontuples.nim b/tests/tuples/tanontuples.nim
index 80bd32b7b..49803e5ac 100644
--- a/tests/tuples/tanontuples.nim
+++ b/tests/tuples/tanontuples.nim
@@ -1,6 +1,5 @@
 discard """
-  output: '''61, 125
-89'''
+  output: '''61, 125'''
 """
 
 proc `^` (a, b: int): int =
@@ -13,7 +12,3 @@ var n = (56, 3)
 m = (n[0] + m[1], m[1] ^ n[1])
 
 echo m[0], ", ", m[1]
-
-var x = (bar: 38)
-x = (foo: 89)
-echo x[0]
diff --git a/tests/tuples/tdifferent_instantiations.nim b/tests/tuples/tdifferent_instantiations.nim
new file mode 100644
index 000000000..9538f67ca
--- /dev/null
+++ b/tests/tuples/tdifferent_instantiations.nim
@@ -0,0 +1,9 @@
+# bug #1920
+import tables
+
+var p: OrderedTable[tuple[a:int], int]
+var q: OrderedTable[tuple[x:int], int]
+for key in p.keys:
+  echo key.a
+for key in q.keys:
+  echo key.x