[fpc-devel] When will the next version of FPC be released?
Martok
listbox at martoks-place.de
Sat Jun 1 12:33:29 CEST 2019
> What with overloads ?
>
> Procedure MyProc<T>(a:T);
> Procedure MyProc(a : TObject);
>
> How do I know which one will be called ?
Once again: FPC needs a defined method resolution order, *and stick with it*.
The current ad-hoc inheritance/typeconv/:= overload/overload/operator overload
mess is already completely unpredictable and super buggy.
Based on a specificity approach, the answer to your question would be obvious:
The latter if a is (a descendant of) TObject, a new specialization otherwise.
--
Regards,
Martok
More information about the fpc-devel
mailing list