Files
Nim/tests/array/t9932.nim
Neelesh Chandola 4c08e64e98 disallow typedesc in arrays & move existing checks to types.typeAllowedAux (#13261)
* disallow typedesc in arrays and move previous checks to types.typeAllowedAux
2020-05-29 11:48:15 +02:00

12 lines
365 B
Nim

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]