closes #12464; adds a test case (#22967)

closes #12464
This commit is contained in:
ringabout
2023-11-21 04:17:20 +08:00
committed by GitHub
parent 81c0513644
commit 8c56e806ae

View File

@@ -24,3 +24,16 @@ s = TAny(kind: nkInt, intVal: 78)
# s = nr # works
nr = s # fails!
echo "came here"
block: # bug #12464
type
Foo = object
case isFunc: bool
of false: nil
of true:
fun: proc(): int
const i = Foo(isFunc: false)
let j = i
doAssert not j.isFunc