disallow typedesc in arrays & move existing checks to types.typeAllowedAux (#13261)
* disallow typedesc in arrays and move previous checks to types.typeAllowedAux
This commit is contained in:
parent
579456d520
commit
4c08e64e98
12 changed files with 70 additions and 50 deletions
11
tests/array/t9932.nim
Normal file
11
tests/array/t9932.nim
Normal file
|
|
@ -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]
|
||||
Loading…
Add table
Add a link
Reference in a new issue