diff options
author | Araq <rumpf_a@web.de> | 2015-01-18 02:33:28 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-01-18 02:33:44 +0100 |
commit | abb738146aea1b9692362bf8048ca23a93bd9fa5 (patch) | |
tree | dc5c498ed813ca7ab80ad5ae45bae8abb02f1e6f /tests/tuples | |
parent | a2b7e6c3925f1320fe178b135fa3d64c62c3e5ef (diff) | |
download | Nim-abb738146aea1b9692362bf8048ca23a93bd9fa5.tar.gz |
revert to old behaviour: tuple field names are not ignored anymore; fixes #1920
Diffstat (limited to 'tests/tuples')
-rw-r--r-- | tests/tuples/tanontuples.nim | 7 | ||||
-rw-r--r-- | tests/tuples/tdifferent_instantiations.nim | 9 |
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 |