diff options
author | Neelesh Chandola <neelesh.chandola@outlook.com> | 2020-05-29 15:18:15 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-29 11:48:15 +0200 |
commit | 4c08e64e9868dabca4a1a82979b74bda5c7d0329 (patch) | |
tree | eb666279521d0934bd35ff5609ee2e5be6f452df /tests/errmsgs | |
parent | 579456d52073229bfe362d3794fae22a479dda38 (diff) | |
download | Nim-4c08e64e9868dabca4a1a82979b74bda5c7d0329.tar.gz |
disallow typedesc in arrays & move existing checks to `types.typeAllowedAux` (#13261)
* disallow typedesc in arrays and move previous checks to types.typeAllowedAux
Diffstat (limited to 'tests/errmsgs')
-rw-r--r-- | tests/errmsgs/t10489_a.nim | 2 | ||||
-rw-r--r-- | tests/errmsgs/t10489_b.nim | 2 | ||||
-rw-r--r-- | tests/errmsgs/t12844.nim | 6 | ||||
-rw-r--r-- | tests/errmsgs/t5870.nim | 2 | ||||
-rw-r--r-- | tests/errmsgs/t8610.nim | 2 | ||||
-rw-r--r-- | tests/errmsgs/ttypeAllowed.nim | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/tests/errmsgs/t10489_a.nim b/tests/errmsgs/t10489_a.nim index 86659f7ac..71a6cc3c4 100644 --- a/tests/errmsgs/t10489_a.nim +++ b/tests/errmsgs/t10489_a.nim @@ -1,5 +1,5 @@ discard """ -errormsg: "cannot assign macro 'm' to 'x1'. Did you mean to call the macro with '()'?" +errormsg: "invalid type: 'macro (body: untyped): untyped{.noSideEffect, gcsafe, locks: 0.}' for let. Did you mean to call the macro with '()'?" line: 9 """ diff --git a/tests/errmsgs/t10489_b.nim b/tests/errmsgs/t10489_b.nim index 1182b4512..4b0b876e5 100644 --- a/tests/errmsgs/t10489_b.nim +++ b/tests/errmsgs/t10489_b.nim @@ -1,5 +1,5 @@ discard """ -errormsg: "cannot assign macro 'm' to 'x2'. Did you mean to call the macro with '()'?" +errormsg: "invalid type: 'macro (body: untyped): untyped{.noSideEffect, gcsafe, locks: 0.}' for const. Did you mean to call the macro with '()'?" line: 9 """ diff --git a/tests/errmsgs/t12844.nim b/tests/errmsgs/t12844.nim index 999d26255..a274b72b4 100644 --- a/tests/errmsgs/t12844.nim +++ b/tests/errmsgs/t12844.nim @@ -1,9 +1,9 @@ discard """ cmd: "nim check $file" -errormsg: "cannot assign template 'z' to 'y'. Did you mean to call the template with '()'?" +errormsg: "invalid type: 'template (args: varargs[string])' for var. Did you mean to call the template with '()'?" nimout: ''' -t12844.nim(11, 11) Error: cannot assign template 'z' to 'x'. Did you mean to call the template with '()'? -t12844.nim(12, 9) Error: cannot assign template 'z' to 'y'. Did you mean to call the template with '()'?''' +t12844.nim(11, 7) Error: invalid type: 'template (args: varargs[string])' for const. Did you mean to call the template with '()'? +t12844.nim(12, 5) Error: invalid type: 'template (args: varargs[string])' for var. Did you mean to call the template with '()'?''' """ template z*(args: varargs[string, `$`]) = diff --git a/tests/errmsgs/t5870.nim b/tests/errmsgs/t5870.nim index bcbc9cca9..96966bcd7 100644 --- a/tests/errmsgs/t5870.nim +++ b/tests/errmsgs/t5870.nim @@ -1,5 +1,5 @@ discard """ -errormsg: "invalid type for const: seq[SomeRefObj]" +errormsg: "invalid type: 'SomeRefObj' in this context: 'seq[SomeRefObj]' for const" line: 14 """ diff --git a/tests/errmsgs/t8610.nim b/tests/errmsgs/t8610.nim index dd1a3ed29..6a253f7ab 100644 --- a/tests/errmsgs/t8610.nim +++ b/tests/errmsgs/t8610.nim @@ -1,5 +1,5 @@ discard """ - errmsg: "'typedesc' metatype is not valid here; typed '=' instead of ':'?" + errmsg: "invalid type: 'type int' for const" """ ## issue #8610 const Foo = int diff --git a/tests/errmsgs/ttypeAllowed.nim b/tests/errmsgs/ttypeAllowed.nim index a5b335faa..9efbc6ead 100644 --- a/tests/errmsgs/ttypeAllowed.nim +++ b/tests/errmsgs/ttypeAllowed.nim @@ -3,7 +3,7 @@ cmd: "nim check $file" errmsg: "" nimout: ''' ttypeAllowed.nim(13, 5) Error: invalid type: 'iterator (a: int, b: int, step: Positive): int{.inline, noSideEffect, gcsafe, locks: 0.}' for let -ttypeAllowed.nim(17, 7) Error: invalid type for const: iterator (a: int, b: int, step: Positive): int{.inline, noSideEffect, gcsafe, locks: 0.} +ttypeAllowed.nim(17, 7) Error: invalid type: 'iterator (a: int, b: int, step: Positive): int{.inline, noSideEffect, gcsafe, locks: 0.}' for const ttypeAllowed.nim(21, 5) Error: invalid type: 'iterator (a: int, b: int, step: Positive): int{.inline, noSideEffect, gcsafe, locks: 0.}' for var ttypeAllowed.nim(26, 10) Error: invalid type: 'iterator (a: int, b: int, step: Positive): int{.inline, noSideEffect, gcsafe, locks: 0.}' for result ''' |