[fpc-pascal] Implicit generic specializations
ryan at thealchemistguild.com
Mon Dec 3 14:01:54 CET 2018
> On Dec 3, 2018, at 2:45 PM, Ryan Joseph <ryan at thealchemistguild.com> wrote:
> I just looked it over and I was wrong about the dummy, it’s just a flag. If the generic doesn’t cover existing functions then that messes up some assumptions I made so I need re-think the design now.
I believe I managed to solve the problem and now non-generic procedures take precedence. I guess it’s possible that you could opt out of an implicit specialization now but declaring and overload which the specific type you were interested in. This is probably a good fallback to have so it’s good it’s like this now.
generic procedure DoThis<T>(msg:T);overload;
DoThis(1); // DoThis:1
DoThis('string’); // DoThis$1:string
More information about the fpc-pascal