View Issue Details

IDProjectCategoryView StatusLast Update
0024458FPCCompilerpublic2013-09-17 16:21
ReporterMaciej Izak Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.7.1 
Fixed in Version3.0.0 
Summary0024458: Generics "class" constraint - wrong behavior
DescriptionI can't compile attached code:

{$mode delphi}

type
  TA<T: class> = class
  public
    procedure Foo(const AValue: T);
  end;

procedure TA<T>.Foo(const AValue: T);
begin
  AValue.Free; // Error: identifier idents no member "Free"
end;
Tagsgenerics
Fixed in Revision24458
FPCOldBugId
FPCTarget
Attached Files

Activities

Maciej Izak

2013-05-21 13:33

reporter  

project15.lpr (259 bytes)

Peter-Jan Roes

2013-09-17 13:50

reporter   ~0070138

Tested this with trunk and this does not seem to be a problem any more.

Paul Ishenin

2013-09-17 14:40

developer   ~0070139

Sven, can you check?

Sven Barth

2013-09-17 16:21

manager   ~0070143

Indeed. This was fixed during my generic constraints rewrite. Added a test to make sure this does not break again :)

Regards,
Sven

Issue History

Date Modified Username Field Change
2013-05-21 13:33 Maciej Izak New Issue
2013-05-21 13:33 Maciej Izak File Added: project15.lpr
2013-05-21 13:33 Maciej Izak Tag Attached: generics
2013-09-17 13:50 Peter-Jan Roes Note Added: 0070138
2013-09-17 14:40 Paul Ishenin Assigned To => Sven Barth
2013-09-17 14:40 Paul Ishenin Status new => assigned
2013-09-17 14:40 Paul Ishenin Note Added: 0070139
2013-09-17 16:21 Sven Barth Fixed in Revision => 24458
2013-09-17 16:21 Sven Barth Note Added: 0070143
2013-09-17 16:21 Sven Barth Status assigned => resolved
2013-09-17 16:21 Sven Barth Fixed in Version => 2.7.1
2013-09-17 16:21 Sven Barth Resolution open => fixed