fix #18310 system.== in vm for NimNode (#18313)

* fix #18310 == in vm

* fixup

* fixup
This commit is contained in:
Timothee Cour 2021-06-21 00:46:31 -07:00 • committed by GitHub
commit ad70a65e0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 5 deletions

View file

@ -256,6 +256,17 @@ block:
doAssert f == @[]
block: # bug #18310
macro t() : untyped =
let
x = nnkTupleConstr.newTree(newLit(1))
y = nnkTupleConstr.newTree(newLit(2))
doAssert not (x == y) # not using != intentionally
doAssert not(cast[int](x) == cast[int](y))
doAssert not(system.`==`(x, y))
doAssert system.`==`(x, x)
t()
block: # bug #10815
type
Opcode = enum