[fpc-devel] Implicit function specialization precedence
Sven Barth
pascaldragon at googlemail.com
Thu May 13 22:38:07 CEST 2021
Am 12.05.2021 um 17:50 schrieb Ryan Joseph via fpc-devel:
>
>> On May 9, 2021, at 1:30 AM, Sven Barth <pascaldragon at 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
More information about the fpc-devel
mailing list