Propagate tfGcSafe flag to generic instantiations (#10620)
Fixes a nasty endless loop in the generic instantiation phase.
This commit is contained in:
parent
942495611b
commit
0ebef1764d
2 changed files with 13 additions and 3 deletions
|
|
@ -242,3 +242,14 @@ block tvarargs_vs_generics:
|
|||
withDirectType "string"
|
||||
withOpenArray "string"
|
||||
withVarargs "string"
|
||||
|
||||
block:
|
||||
type
|
||||
Que[T] {.gcsafe.} = object
|
||||
x: T
|
||||
|
||||
proc `=`[T](q: var Que[T]; x: Que[T]) =
|
||||
discard
|
||||
|
||||
var x: Que[int]
|
||||
doAssert(x.x == 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue