diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-10-26 22:19:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 22:19:05 +0200 |
commit | 3bdc0005211b0d543e0ff48ccf6bc5a9f2a2a30b (patch) | |
tree | d17e520691de67784767dafd103357233b46959d /tests/vm | |
parent | cf01945f54f099c268850c720986ad6c9bbdb51e (diff) | |
download | Nim-3bdc0005211b0d543e0ff48ccf6bc5a9f2a2a30b.tar.gz |
[backport] fix #15595 procvar `==` works in VM (#15724)
Diffstat (limited to 'tests/vm')
-rw-r--r-- | tests/vm/tvmmisc.nim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/vm/tvmmisc.nim b/tests/vm/tvmmisc.nim index f05bb6dec..e4d6c308f 100644 --- a/tests/vm/tvmmisc.nim +++ b/tests/vm/tvmmisc.nim @@ -205,6 +205,30 @@ block: # bug #13081 static: doAssert j1.x1 == 12 +block: # bug #15595 + proc fn0()=echo 0 + proc fn1()=discard + proc main= + var local = 0 + proc fn2()=echo local + var a0 = fn0 + var a1 = fn1 + var a2 = fn2 + var a3: proc() + var a4: proc() + doAssert a0 == fn0 # bugfix + doAssert a1 == fn1 # ditto + doAssert a2 == fn2 # ditto + + doAssert fn0 != fn1 + + doAssert a2 != nil + doAssert a3 == nil # bugfix + + doAssert a3 == a4 # bugfix + static: main() + main() + # bug #15363 import sequtils |