Porting from XE7 to XE8: Internal Compiler Error F2048 using a interface in a TList.

Porting from XE7 to XE8: Internal Compiler Error F2048 using a interface in a TList. I filed a bug report: https://quality.embarcadero.com/browse/RSP-10305

This won't compile:

program ErrorF2084;
 
uses
  System.Generics.Collections;
 
type
  TMyList = class(TList)
  public
    function Foo(const Item: IInterface): Integer;
  end;
 
  IFoo = interface
    function Foo: Integer;
  end;
 
{ TMyList }
 
function TMyList.Foo(const Item: IInterface): Integer;
begin
//  Result := Add(Item); // works
  Result := Remove(Item); // internal error F2084
end;
 
begin
  TMyList.Create;
end.

A not so good start. I hope for some improvements regarding Out Of Memory-Problem but it seems it'll take a bit longer to get some results.
https://quality.embarcadero.com/browse/RSP-10305

Comments