forbid casting to bare unchecked array (#11186)
* fixes #11180, forbid casting to unchecked array. * allow UncheckedArray as param
This commit is contained in:
parent
a5fb0acf5f
commit
34405db80f
3 changed files with 23 additions and 7 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue