diff options
author | cooldome <ariabushenko@gmail.com> | 2020-11-18 22:30:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-18 23:30:28 +0100 |
commit | acf8316e502cf46358df220ef4250b7ca96c6c64 (patch) | |
tree | f986cae81b629c298c3692eebbe96e87b64b7eb3 /tests | |
parent | bf8421a2fc7148c41a1073f3e8648d18d78f8f7e (diff) | |
download | Nim-acf8316e502cf46358df220ef4250b7ca96c6c64.tar.gz |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/misc/tcast.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/misc/tcast.nim b/tests/misc/tcast.nim index 6c6de6f8d..454801a2d 100644 --- a/tests/misc/tcast.nim +++ b/tests/misc/tcast.nim @@ -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: |