Am 12.05.2021 um 17:50 schrieb Ryan Joseph via fpc-devel:
On May 9, 2021, at 1:30 AM, Sven Barth <pascaldra...@googlemail.com> wrote:
Essentially it will boil down to sym.ChangeOwner(pd.parast)
However you need to keep the Owner (which is different from what you change
with ChangeOwner) different as otherwise is_specialization of the procdef will
not work correctly.
I'm saving the storing symbols in tcallcandiates so they can be available when
maybe_add_pending_specialization is called once the call node chooses the
specialization, and then I ran into this problem. The symbol I make in
create_unamed_typesym has FOwner nil so calling TFPHashObject.ChangeOwner
crashes. Did I not make the symbol correctly or do I need to do something
before calling ChangeOwner?
Ah, you need to use ChangeOwnerAndName then and simply pass in the same
name you used for the constructor (cause otherwise it tries to use the
name that is currently stored in the list).
Regards,
Sven
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel