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/array | |
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/array')
-rw-r--r-- | tests/array/t9932.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/array/t9932.nim b/tests/array/t9932.nim new file mode 100644 index 000000000..1e09c487b --- /dev/null +++ b/tests/array/t9932.nim @@ -0,0 +1,11 @@ +discard """ +cmd: "nim check $file" +errormsg: "invalid type: 'type int' in this context: 'array[0..0, type int]' for var" +nimout: ''' +t9932.nim(10, 5) Error: invalid type: 'type' in this context: 'array[0..0, type]' for var +t9932.nim(11, 5) Error: invalid type: 'type int' in this context: 'array[0..0, type int]' for var +''' +""" + +var y: array[1,type] +var x = [int] |