diff options
author | metagn <metagngn@gmail.com> | 2023-09-02 11:32:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-02 10:32:46 +0200 |
commit | bd6adbcc9d5a22f686eed7bc988a1c0b1b0a17e4 (patch) | |
tree | c234bff4e9a015821f9e38f734d4fbf0cdfe1d1c /tests | |
parent | 9f1fe8a2da27abc1e93a05debbb2622b524aae0d (diff) | |
download | Nim-bd6adbcc9d5a22f686eed7bc988a1c0b1b0a17e4.tar.gz |
fix isNil folding for compile time closures (#22574)
fixes #20543
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vm/tvmmisc.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/vm/tvmmisc.nim b/tests/vm/tvmmisc.nim index 1429ef6e9..cade68577 100644 --- a/tests/vm/tvmmisc.nim +++ b/tests/vm/tvmmisc.nim @@ -232,6 +232,14 @@ block: # bug #15595 static: main() main() +block: # issue #20543 + type F = proc() + const myArray = block: + var r: array[1, F] + r[0] = nil + r + doAssert isNil(myArray[0]) + # bug #15363 import sequtils |