Florian Klämpfl via fpc-devel wrote:
  Hello,

As some might have noticed, We have placed the first release candidate of the Free Pascal Compiler
version 3.2.4 on our download servers already for some time.

Below test program compiles with fpc-3.2.2. but not with fpc-3.2.4 rc1 This is 
on MacOS 14 with an M2.

Regards,

Adriaan van Os


administrator% /usr/local/lib/fpc/3.2.2/ppca64 generics01.pas
Free Pascal Compiler version 3.2.2 [2021/05/16] for aarch64
...
Compiling generics01.pas
...
Assembling generics01
32 lines compiled, 0.5 sec
4 warning(s) issued
36 note(s) issued

administrator% /usr/local/lib/fpc/3.2.4/ppca64 generics01.pas
Free Pascal Compiler version 3.2.4-rc1 [2025/06/20] for aarch64
...
Compiling generics01.pas
generics01.pas(21,15) Error: function header doesn't match the previous declaration "ValueNotify(constref TPluginFormat;TCollectionNotification);" generics.dictionariesh.inc(99,15) Error: Found declaration: ValueNotify(const TPluginFormat;TCollectionNotification);
generics01.pas(24,1) Fatal: There were 2 errors compiling module, stopping


{$mode delphiunicode}
unit generics01;

interface

uses
  Classes, Generics.Collections;

type
  TPluginFormatID = Integer;

  TPluginFormat = class abstract
  public
    Name: string;
  end;

  TPluginFormatList = class(TDictionary<TPluginFormatID, TPluginFormat>)
  protected
procedure ValueNotify({$IFDEF fpc}constref{$ELSE}const{$ENDIF}Value: TPluginFormat; Action: TCollectionNotification); override;
  end;

implementation

procedure TPluginFormatList.ValueNotify({$IFDEF fpc}constref{$ELSE}const{$ENDIF}Value: TPluginFormat; Action: TCollectionNotification);
begin
end;

begin
end.



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

Reply via email to