[fpc-devel] Implicit function specialization precedence

Ryan Joseph genericptr at gmail.com
Wed May 12 17:50:41 CEST 2021



> 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?

Regards,
	Ryan Joseph



More information about the fpc-devel mailing list