From 2339542832f754cffda5905b3ed6fdbf8766cad7 Mon Sep 17 00:00:00 2001 From: Arne Döring Date: Wed, 15 May 2019 17:59:06 +0200 Subject: Tuple error message (#11141); fixes #3211 --- tests/tuples/ttypedesc_in_tuple_a.nim | 5 +++++ tests/tuples/ttypedesc_in_tuple_b.nim | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 tests/tuples/ttypedesc_in_tuple_a.nim create mode 100644 tests/tuples/ttypedesc_in_tuple_b.nim (limited to 'tests/tuples') 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) -- cgit 1.4.1-2-gfad0