forbid casting to bare unchecked array (#11186)

* fixes #11180, forbid casting to unchecked array.
* allow UncheckedArray as param
This commit is contained in:
Arne Döring 2019-05-08 09:36:27 +02:00 • committed by Andreas Rumpf
commit 34405db80f
3 changed files with 23 additions and 7 deletions

View file

@ -4,7 +4,7 @@ IntLit 5
proc (x: int): string => typeDesc[proc[string, int]]
proc (x: int): void => typeDesc[proc[void, int]]
proc (x: int) => typeDesc[proc[void, int]]
x => UncheckedArray[int]
x => seq[int]
a
s
d
@ -111,7 +111,7 @@ block t2211:
showType(proc(x:int): void)
showType(proc(x:int))
var x: UncheckedArray[int]
var x: seq[int]
showType(x)