mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 22:35:24 +00:00
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:
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]
|
||||
Reference in New Issue
Block a user