Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Bart via fpc-devel
On Sun, Sep 18, 2022 at 3:27 PM Martin Frb via fpc-devel wrote: > And if the base class has > function SameValue(AValue1, AValue2: T): Boolean; virtual; // but > not abstract > > Which implements the old call, without typecast? I think Werner already tried that and it faile on type

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Bart via fpc-devel
On Sun, Sep 18, 2022 at 3:09 PM Werner Pamler via fpc-devel wrote: > > Werner reported that it does not compile on MacOS (64 bit) with fpc 3.3.1. > Sorry if I was not precise here: I only tested with fpc 3.2.0. I misread, my mistake. Q1: these ifdef-ed code: does it have to be in the

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Martin Frb via fpc-devel
On 18/09/2022 14:29, Bart via fpc-devel wrote: I wonder anyway TCustomSpinEditEx = class(specialize TSpinEditExBase) But "SameValue" does not exist for int64 (or any int)? So I assume the compiler converts the int to a float (Note: The base class can have a virtual abstract

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Bart via fpc-devel
On Sun, Sep 18, 2022 at 2:29 PM Bart wrote: > > Just enable fpc_math_samevalue_bug > > > > {$if FPC_FullVersion=30202}{$ifdef Win64} > >{$define fpc_math_samevalue_bug} > > {$endif}{$endif} OMG. I only found out right now that this define is already there. Oh, and on Linux my fpc was still

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Werner Pamler via fpc-devel
Am 18.09.2022 um 14:04 schrieb Bart via fpc-devel: Werner reported that it does not compile on MacOS (64 bit) with fpc 3.3.1. Sorry if I was not precise here: I only tested with fpc 3.2.0. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Bart via fpc-devel
On Sun, Sep 18, 2022 at 1:34 PM Martin Frb via fpc-devel wrote: > Just enable fpc_math_samevalue_bug > > {$if FPC_FullVersion=30202}{$ifdef Win64} >{$define fpc_math_samevalue_bug} > {$endif}{$endif} This suggest that the bug is in Windows 3.2.2 > Make it > {$if FPC_FullVersion<=30202} >

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Bart via fpc-devel
On Sun, Sep 18, 2022 at 1:17 PM Maxim Ganetsky via fpc-devel wrote: > As far as I see from CI build log, FPC 3.2.0 is the culprit. FPC 3.2.2 > compiles your code fine both on Linux and Windows. Werner reported that it does not compile on MacOS (64 bit) with fpc 3.3.1. -- Bart

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Martin Frb via fpc-devel
On 18/09/2022 11:37, Bart via fpc-devel wrote: Hi, The following program will compile for Windows 32 and 64 bit. It fails to compile for Linix 64 bit (and if I understand correctly, also for MacOS 64 bit). Just enable fpc_math_samevalue_bug {$if FPC_FullVersion=30202}{$ifdef Win64}  

Re: [fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Maxim Ganetsky via fpc-devel
18.09.2022 12:37, Bart via fpc-devel пишет: Hi, The following program will compile for Windows 32 and 64 bit. It fails to compile for Linix 64 bit (and if I understand correctly, also for MacOS 64 bit). <...> Linux 64-bit Compile Project, Target: test: Exit code 1, Errors: 1, Hints: 3

[fpc-devel] Overloading problem in generic class.

2022-09-18 Thread Bart via fpc-devel
Hi, The following program will compile for Windows 32 and 64 bit. It fails to compile for Linix 64 bit (and if I understand correctly, also for MacOS 64 bit). === begin code === program test; {$mode objfpc} {$H+} {$ifdef FPC_HAS_TYPE_EXTENDED} function SameValue(const A, B: Extended):