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:
cooldome 2020-11-18 22:30:28 +00:00 • committed by GitHub
commit acf8316e50
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 2 deletions

View file

@ -51,7 +51,7 @@
- The `cstring` doesn't support `[]=` operator in JS backend.
- nil dereference is not allowed at compile time. `cast[ptr int](nil)[]` is rejected at compile time.
## Compiler changes