<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>Delphi mode, fpc 3.0.0</p>
<p>I have a Sort method:</p>
<p class="MsoNormal">type<o:p></o:p></p>
<p class="MsoNormal"> TArray<T> = class<o:p></o:p><br>
</p>
<p class="MsoNormal"> class procedure Sort(var Values: array of
T; const Comparer: IComparer<T>); <o:p></o:p></p>
end;<br>
<br>
If I call Sort with some real type it compiles and works:<br>
<br>
TArray<T>.Sort(string,comparer);<br>
<br>
but if i call it from another generic type - it does not compile:<br>
<p class="MsoNormal">class procedure Arrays<T>.sort(var arr:
array of T; const Comparer: IComparer<T>);</p>
<p class="MsoNormal">begin<br>
</p>
<o:p></o:p>TArray<T>.Sort(arr,comparer);<o:p></o:p><br>
<br>
end;<br>
<p class="MsoNormal">Fatal: Syntax error, "CREATE" expected but
"SORT" found</p>
<p class="MsoNormal">Anything I can do to make it compile?</p>
<p class="MsoNormal">Should I try objfp mode?</p>
<p class="MsoNormal">Thanks,</p>
<p class="MsoNormal">Gennady<br>
</p>
<p class="MsoNormal"><br>
</p>
<br>
</body>
</html>