[fpc-devel] When will the next version of FPC be released?

J. Gareth Moreton gareth at moreton-family.com
Sun Jun 2 05:09:08 CEST 2019


I would personally consider this a 
compiler error because there's too much 
ambiguity and assumption involved when 
choosing one over the other. In my eyes, 
the correct choice is too unclear.

Gareth aka. Kit


On Sat 01/06/19 21:41 , Ben Grasset 
operator97 at gmail.com sent:
> On Sat, Jun 1, 2019 at 6:00 AM Michael 
Van Canneyt  wrote: I don't think
> this syntax is a good idea.
> 
> What with overloads ?
> 
> Procedure MyProc(a:T);
> Procedure MyProc(a : TObject);
> 
> How do I know which one will be called ?
> 
> I think it would have to work like: if 
something is a TObject descendant
> (meaning, any class) and both of those 
functions were actually in scope, it
> would always pick the non-generic 
TObject one for them. Anything that could
> not validly be cast to TObject would 
have the generic one picked for it.
> I can't really think of a good reason 
that someone would have both versions
> of the function side-by-side like that 
in reality, though. 
> 
__________________________________________
_____
> fpc-devel maillist - fpc-
devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-
bin/mailman/listinfo/fpc-devel [1]
> 
> 
> 
> Links:
> ------
> [1]
> http://secureweb.fast.net.uk/parse.php?
redirect=http://lists.freepascal.org
> /cgi-bin/mailman/listinfo/fpc-devel
> 




More information about the fpc-devel mailing list