summary refs log tree commit diff stats
path: root/tests/tuples
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2019-05-15 17:59:06 +0200
committerAndreas Rumpf <rumpf_a@web.de>2019-05-15 17:59:06 +0200
commit2339542832f754cffda5905b3ed6fdbf8766cad7 (patch)
tree8218a289a8e59da6f7941606b18554c17bc0d091 /tests/tuples
parentde6b2e88d23e2a697cd772958463aa2201bece1d (diff)
downloadNim-2339542832f754cffda5905b3ed6fdbf8766cad7.tar.gz
Tuple error message (#11141); fixes #3211
Diffstat (limited to 'tests/tuples')
-rw-r--r--tests/tuples/ttypedesc_in_tuple_a.nim5
-rw-r--r--tests/tuples/ttypedesc_in_tuple_b.nim5
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)