[fpc-pascal] Can't determine which overloaded function to call

LacaK lacak at zoznam.sk
Tue Dec 4 13:21:50 CET 2018


Hi *,

this code compiles for target Win32 but does not compile for
Win64/x86-64. Why? Is there workaround?
(Error: Can't determine which overloaded function to call)
Thank you
-Laco.

=== code sample ===

  TRec1 = record
    x,y: integer;
    function Offset(const Ax,Ay: integer): TRec1; overload;
    function Offset(const Ax,Ay: single): TRec1; overload;
  end;

function TRec1.Offset(const Ax,Ay: integer): TRec1;
begin
end;

function TRec1.Offset(const Ax,Ay: single): TRec1;
begin
end;

var
  r1: TRec1;
  a,b: integer;

begin
  r1 := r1.Offset(a-1,b-1); // HERE Error:
end.  

============================




More information about the fpc-pascal mailing list