<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 25/11/2025 14:19, Sven Barth via
fpc-devel wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAFMUeB8awP6YhxcYtqgxDV98uJ=m=SvZ2vSQs17evUqBY9hM=Q@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="auto">
<div>
<div class="gmail_quote gmail_quote_container"><br>
</div>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">Yes, because in fact they don't have the same
name. The name of a generic with a single parameter is
essentially "TFoo<>" while that of a generic with two
parameters is "TFoo<,>". </div>
<div dir="auto"><br>
</div>
<div dir="auto">The amount of generic parameters is part of the
type or routine name.</div>
<br>
</div>
</blockquote>
<br>
Thanks, which just for confirmation brings up a follow up question.
(I haven't used generic function much yet, so maybe I miss
something)<br>
<br>
<font face="monospace"> function Foo (aParam: Integer):
integer;<br>
generic function Foo<T>(aParam: t) : integer;</font><br>
<br>
<br>
Those are 2 different function too? (not an overload? because "T"
could be integer in same cases)<br>
<br>
Do you then always have to call the generic using <br>
specialize Foo<integer>(1)<br>
?<br>
<br>
I seem to remember a discussion about adding automatic
specialization?<br>
But then<br>
foo('abc') // would be clear, to specialize with string<br>
but<br>
foo(1) // could be either
</body>
</html>