View Issue Details

IDProjectCategoryView StatusLast Update
0038785FPCCompilerpublic2021-04-21 16:19
ReporterMichael Van Canneyt Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version3.2.2 
Summary0038785: Generics type reference not found
DescriptionDelphi compiles attached source file, FPC does not. It fails to resolve the function definition:

Units.Eventer.pas(31,22) Error: Function header doesn't match any method of this class "RegisterDataEvent$1(TArgumentEventItem$1$crcA9AAA8BA.TTEvent;T):LongInt;"
Units.Eventer.pas(23,14) Error: Found declaration: RegisterDataEvent$1(TArgumentEventItem$1$crcFEC21D9F.TTEvent;T):LongInt;
Units.Eventer.pas(36) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/local/bin/ppcx64 returned an error exitcode
Steps To ReproduceTry to compile attached unit.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget
Attached Files

Activities

Michael Van Canneyt

2021-04-21 16:19

administrator  

Units.Eventer.pas (611 bytes)   
unit Units.Eventer;

{$mode delphi}

interface

Type
  TEventItem = Class(TObject)
  Protected
    Procedure Execute; virtual; abstract;
  End;

  TArgumentEventItem<T> = Class(TEventItem)
  Public
    Type
      TTEvent =  procedure(Sender : T);
  Public
  End;

  TEventQueue = Class (TObject)
  Private
  Public
    Function RegisterDataEvent<T>(aEvent : TArgumentEventItem<T>.TTEvent; aSender : T) : Integer; 
  End;

implementation


{ TEventQueue }

function TEventQueue.RegisterDataEvent<T>(aEvent: TArgumentEventItem<T>.TTevent; aSender: T): Integer;
begin
end;

end.
Units.Eventer.pas (611 bytes)   

Issue History

Date Modified Username Field Change
2021-04-21 16:19 Michael Van Canneyt New Issue
2021-04-21 16:19 Michael Van Canneyt File Added: Units.Eventer.pas