View Issue Details

IDProjectCategoryView StatusLast Update
0021015FPCCompilerpublic2014-06-10 18:29
ReporterAlexander Shishkin Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version2.7.1 
Fixed in Version3.0.0 
Summary0021015: Generic interface implementation
DescriptionIn some cases variable of generic interface type become incompatible with implementation.

generictest9.lpr(10,16) Error: Incompatible types: got "TGenImpl$1$LongInt" expected "ITest$1$LongInt"
Steps To Reproduceprogram generictest9;

{$mode delphi}

uses t9u1;

var
  x: IIntTest;
begin
  x := TGenImpl<Integer>.Create;
end.
       
unit t9u1;

{$mode delphi}

interface

type
  ITest<T> = interface
  end;

  TGenImpl<T> = class (TInterfacedObject,ITest<T>)
  end;

  IIntTest = Itest<Integer>;
implementation

end.
Additional Informationif all code is in lpr file - no error
if "x: IIntTest;" changed to "x: Itest<Integer>;" - no error
Tagsgenerics
Fixed in Revision25609
FPCOldBugId
FPCTarget
Attached Files

Activities

Sven Barth

2013-09-30 10:45

manager   ~0070449

Please test and close if okay.

Regards,
Sven

Issue History

Date Modified Username Field Change
2012-01-03 18:53 Alexander Shishkin New Issue
2012-01-03 19:02 Alexander Shishkin Tag Attached: generics
2013-09-30 10:45 Sven Barth Fixed in Revision => 25609
2013-09-30 10:45 Sven Barth Note Added: 0070449
2013-09-30 10:45 Sven Barth Status new => resolved
2013-09-30 10:45 Sven Barth Fixed in Version => 2.7.1
2013-09-30 10:45 Sven Barth Resolution open => fixed
2013-09-30 10:45 Sven Barth Assigned To => Sven Barth
2014-06-10 18:29 Alexander Shishkin Status resolved => closed