diff options
author | Arne Döring <arne.doering@gmx.net> | 2019-05-15 17:59:06 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-05-15 17:59:06 +0200 |
commit | 2339542832f754cffda5905b3ed6fdbf8766cad7 (patch) | |
tree | 8218a289a8e59da6f7941606b18554c17bc0d091 /tests/tuples | |
parent | de6b2e88d23e2a697cd772958463aa2201bece1d (diff) | |
download | Nim-2339542832f754cffda5905b3ed6fdbf8766cad7.tar.gz |
Tuple error message (#11141); fixes #3211
Diffstat (limited to 'tests/tuples')
-rw-r--r-- | tests/tuples/ttypedesc_in_tuple_a.nim | 5 | ||||
-rw-r--r-- | tests/tuples/ttypedesc_in_tuple_b.nim | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/tuples/ttypedesc_in_tuple_a.nim b/tests/tuples/ttypedesc_in_tuple_a.nim new file mode 100644 index 000000000..7727bb35e --- /dev/null +++ b/tests/tuples/ttypedesc_in_tuple_a.nim @@ -0,0 +1,5 @@ +discard """ +errormsg: "typedesc not allowed as tuple field." +""" + +var bar = (a: int, b: 1) diff --git a/tests/tuples/ttypedesc_in_tuple_b.nim b/tests/tuples/ttypedesc_in_tuple_b.nim new file mode 100644 index 000000000..b393d877c --- /dev/null +++ b/tests/tuples/ttypedesc_in_tuple_b.nim @@ -0,0 +1,5 @@ +discard """ +errormsg: "Mixing types and values in tuples is not allowed." +""" + +var bar = (int, 1) |