<div dir="ltr"><div dir="ltr">On Sat, Jun 1, 2019 at 6:00 AM Michael Van Canneyt <<a href="mailto:michael@freepascal.org">michael@freepascal.org</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I don't think this syntax is a good idea.<br>
<br>
What with overloads ?<br>
<br>
Procedure MyProc<T>(a:T);<br>
Procedure MyProc(a : TObject);<br>
<br>
How do I know which one will be called ?<br></blockquote><div><br></div><div>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.</div><div><br></div><div>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.</div></div></div>