diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/errmsgs/tmake_tuple_visible.nim | 7 | ||||
-rw-r--r-- | tests/tuples/ttypedesc_in_tuple_a.nim | 5 | ||||
-rw-r--r-- | tests/tuples/ttypedesc_in_tuple_b.nim | 5 |
3 files changed, 12 insertions, 5 deletions
diff --git a/tests/errmsgs/tmake_tuple_visible.nim b/tests/errmsgs/tmake_tuple_visible.nim index e059368ad..90b965c64 100644 --- a/tests/errmsgs/tmake_tuple_visible.nim +++ b/tests/errmsgs/tmake_tuple_visible.nim @@ -1,9 +1,6 @@ discard """ - errormsg: '''got <tuple of (type NimEdAppWindow, int)>''' - line: 22 - nimout: '''got <tuple of (type NimEdAppWindow, int)> -but expected one of: -template xxx(tn: typedesc; i: int)''' + errormsg: '''Mixing types and values in tuples is not allowed.''' + line: 19 """ type 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) |