Disallow nil dereference at compile time (#16032)
* bring back the semfold of nil * remove space * fix test * proc type can't be dereferenced * disallow nil dereference at compile time * changelog
This commit is contained in:
parent
bf8421a2fc
commit
acf8316e50
4 changed files with 12 additions and 2 deletions
|
|
@ -33,7 +33,8 @@ reject: discard cast[ptr](a)
|
|||
# bug #15623
|
||||
block:
|
||||
if false:
|
||||
echo cast[ptr int](nil)[]
|
||||
let x = cast[ptr int](nil)
|
||||
echo x[]
|
||||
|
||||
block:
|
||||
if false:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue