mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-12 12:19:40 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user