View Issue Details

IDProjectCategoryView StatusLast Update
0026481FPCCompilerpublic2019-02-12 12:46
ReporterMaciej Izak Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.7.1 
Fixed in Version3.0.0 
Summary0026481: Generics regression, fatal error for class var.
DescriptionAll works fine in rev 27327 but in rev 28152 compiler raise Fatal error:

program p002;

{$MODE DELPHI}

type
  IComparer<T> = interface
    function Compare(constref Left, Right: T): Integer; overload;
  end;

  TOrdinalComparer<T, THashFactory> = class(TInterfacedObject, IComparer<T>)
  protected class var
    FComparer: IComparer<T>;
  public
    function Compare(constref Left, Right: T): Integer; virtual; abstract;
  end;

  TGOrdinalStringComparer<T, THashFactory> = class(TOrdinalComparer<T, THashFactory>)
  public
    function Compare(constref ALeft, ARight: T): Integer; override;
  end;

function TGOrdinalStringComparer<THashFactory, T>.Compare(constref ALeft,
  ARight: T): Integer;
begin
  Result := FComparer.Compare(ALeft, ARight);
end;

begin
end.
Tagsgenerics
Fixed in Revision29484
FPCOldBugId
FPCTarget
Attached Files

Relationships

related to 0027206 resolvedSven Barth [Patch] Christmas gift by FreeSparta : Generics.Collections 

Activities

Maciej Izak

2014-07-13 20:52

reporter  

p002.lpr (725 bytes)

Sven Barth

2015-01-16 17:06

manager   ~0080447

Please test and close if okay.

Regards,
Sven

Issue History

Date Modified Username Field Change
2014-07-13 20:52 Maciej Izak New Issue
2014-07-13 20:52 Maciej Izak File Added: p002.lpr
2014-07-18 16:12 Sven Barth Tag Attached: generics
2015-01-07 21:37 Sven Barth Relationship added related to 0027206
2015-01-16 17:06 Sven Barth Fixed in Revision => 29484
2015-01-16 17:06 Sven Barth Note Added: 0080447
2015-01-16 17:06 Sven Barth Status new => resolved
2015-01-16 17:06 Sven Barth Fixed in Version => 3.1.1
2015-01-16 17:06 Sven Barth Resolution open => fixed
2015-01-16 17:06 Sven Barth Assigned To => Sven Barth
2015-08-29 16:05 Joost van der Sluis Fixed in Version 3.1.1 => 3.0.1