adds a test case (#24565)

closes #19531
This commit is contained in:
ringabout
2024-12-25 16:26:06 +08:00
committed by GitHub
parent 2f127bf99f
commit 65b26401bc

View File

@@ -194,3 +194,28 @@ block: # bug #21347
proc b2(n: bool) = s[K[K[int]]]()
b1(false) # Error: 's' has unspecified generic parameters
b2(false) # Builds, on its own
block: # bug #19531
type
Foo[T] = object
Bar[F: Foo] = object
c: proc(t: F.T)
proc cb[F](v: Bar[F]) =
v.c(default(F.T))
type
X = object
x: uint32
Y = object
x: uint32
proc cbX(v: X) = discard
proc cbY(v: Y) = discard
let
x = Bar[Foo[X]](c: cbX)
y = Bar[Foo[Y]](c: cbY)
x.cb()
y.cb()