Anyone with XE5 care to check if the following still gives an internal compiler error?

Anyone with XE5 care to check if the following still gives an internal compiler error?

type
Interf1 = interface end;
Interf2 = interface end;

TObj = class (TInterfacedObject, Interf1, Interf2) end;

var
i1: Interf1;
i2: Interf2;
begin
i1 := TObj.Create;
i2 := i1 as Interf2;
end.

Comments

  1. It gives the error that Interf2 needs a GUID when used with "as".

    ReplyDelete
  2. Thanks, no point in running to QC then :-) For reference I'm using XE3.

    ReplyDelete
  3. That actually works?  I'm quite surprised.

    ReplyDelete
  4. Nick Hodges It shouldn't work, but it should generate a nice error message (which apparently XE5 does) and not an internal compiler error (which XE3 does).

    ReplyDelete

Post a Comment