Closed ringabout closed 4 weeks ago
I didn't notice this before, I think this is the problem:
The propagation of tfHasAsgn
is restricted to some type kinds, which includes tySequence
but not tyString
, which fails the ast.hasDestructor
condition for the typetrait. And in isGCRef
, strings and seqs are excluded from counting as GC'd memory, so the other containsGarbageCollectedRef
check also fails.
I would guess the solution is including string types in the filter in propagateToOwner
(which makes it work) but could it break something else?
but could it break something else?
I don't think so.
Thanks for your hard work on this PR! The lines below are statistics of the Nim compiler built from 5e56f0a356bc86fd4b135c170c0fee2e96e7257b
Hint: mm: orc; opt: speed; options: -d:release 176086 lines; 8.889s; 655.141MiB peakmem
fixes #24378
semAfterMacroCall
doesn't skip the children aliases types in the tuple typedesc construction while the normal program seem to skip the aliases types somewhere(int, Win)
is kept as(int, alias string)
instead of expected(int, string)