Hi,

 

Independent of what Delphi may support or not (and I agree that at a minimum in 
$mode Delphi fpc should not require that IFDEF)… 

 

in a modern compiler I would expect the generic type parameter to be optional 
in this specific scenario and the compiler infer it from the type of the 
parameters.

 

Cheers,

Thorsten

 

From: fpc-devel-boun...@lists.freepascal.org 
[mailto:fpc-devel-boun...@lists.freepascal.org] On Behalf Of Gennady Agranov
Sent: Monday, 2 January 2017 06:23
To: fpc-devel@lists.freepascal.org
Subject: Re: [fpc-devel] Problem with generic parameter

 

Hi Sven,

Based on bug#20503 you are in charge of support for "generics"?
Thanks a lot for your work!

What about this incompatibility - is it a known issue?

        {$ifdef FPC}
        if 
Arrays<TTreeNode>.BinarySearch(changes.m_children,node,j,getComparatorByName) 
then
        {$else}
        if 
Arrays.BinarySearch<TTreeNode>(changes.m_children,node,j,getComparatorByName) 
then
        {$endif}

Thanks,
Gennady

On 12/31/2016 1:25 PM, Sven Barth wrote:

Am 31.12.2016 10:33 schrieb "Дмитрий Померанцев" <p...@yandex.ru 
<mailto:p...@yandex.ru> >:
>
> Welcome to five years old bug. :)
> http://bugs.freepascal.org/view.php?id=20503

Nope, that's not the same problem. Also the code example of the thread starter 
did not contain a generic method.

Regards,
Sven






_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org 
<mailto:fpc-devel@lists.freepascal.org> 
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

 

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to