Code does not compile

This code no longer compiles when using latest Elements compiler (13.x)

unit System_;

interface

type
   TDummy = class
   end;

  function  AtomicDecrement(var Target: Integer; const Value: Integer := 1): Integer; 
  function  AtomicIncrement(var Target: Integer; const Value: Integer := 1): Integer; 
  function  AtomicDecrement(var Target: Int64; const Value: Int64 := 1): Int64; 
  function  AtomicIncrement(var Target: Int64; const Value: Int64 := 1): Int64;

implementation

function AtomicDecrement(var Target: Integer; const Value: Integer := 1): Integer;
begin
  Target := Target - Value;
  Result := Target;
end;

function AtomicIncrement(var Target: Integer; const Value: Integer := 1): Integer;
begin
  Target := Target + Value;
  Result := Target;
end;

function AtomicDecrement(out Target: Int64; const Value: Int64 := 1): Int64;
begin
  Target := Target - Value;
  Result := Target;
end;

function AtomicIncrement(var Target: Int64; const Value: Int64 := 1): Int64;
begin
  Target := Target + Value;
  Result := Target;
end;

end.

The error I get is:
(E58) Duplicate method “class function AtomicDecrement(out Target: Int64; Value: Int64): Int64” with same signature

This code did work with earlier (12.x) compiler

Hi!

You have var Targetin the declaration and out Targetin the implementation. I suppose you wanted to use var in the implementation too?

Regards, Kate

Thanks, we totally missed that!