summary refs log tree commit diff stats
path: root/tests/array
diff options
context:
space:
mode:
authorNeelesh Chandola <neelesh.chandola@outlook.com>2020-05-29 15:18:15 +0530
committerGitHub <noreply@github.com>2020-05-29 11:48:15 +0200
commit4c08e64e9868dabca4a1a82979b74bda5c7d0329 (patch)
treeeb666279521d0934bd35ff5609ee2e5be6f452df /tests/array
parent579456d52073229bfe362d3794fae22a479dda38 (diff)
downloadNim-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.nim11
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]