fix 25667; Generic forward type confusion (#25737)

ref: #25667

drain deferred reification in a loop until there is no more work to do.
Could potentially evaluate the same deferred work more than once.

---------

Co-authored-by: Andreas Rumpf <araq4k@proton.me>
This commit is contained in:
Ryan McConnell
2026-04-18 02:52:31 -04:00
committed by GitHub
parent e6e00a74a3
commit f98578ea35
5 changed files with 60 additions and 16 deletions

View File

@@ -68,3 +68,20 @@ block:
let sized = Sized()
doAssert sized.files.x == sizeof(Sized)
block:
type
Generic[T] = object
t: T
WindowObj = object
svgCache: Generic[SVGSVGElement]
SVGSVGElement = Generic[SVGSVGElementObj]
SVGSVGElementObj = object
proc foo() =
let p: pointer = nil
discard cast[ptr WindowObj](p)
foo()