closes #14710; adds a test case (#23277)

closes #14710
This commit is contained in:
ringabout
2024-02-05 22:46:51 +08:00
committed by GitHub
parent 6c2fca1a8b
commit 3550c907de

View File

@@ -96,3 +96,13 @@ block: # issue #12582
x: foo(int) # error
let b = Bar()
let b2 = Bar(x: [123])
block:
when true: # bug #14710
type Foo[T] = object
x1: int
when T.sizeof == 4: discard # SIGSEGV
when sizeof(T) == 4: discard # ok
let t = Foo[float](x1: 1)
doAssert t.x1 == 1