Steve
Steve

Reputation: 6470

Is this a bug in Delphi 2009?

It certainly looks like a bug, but I only have the trial version so it may have been fixed.

ITestInterface = interface
  ['{9445CED8-4DBA-4EDB-9897-60980B438BE4}']
  procedure Foo1;
  procedure Foo2;
end;

TTest = class(TInterfacedObject, ITestInterface)

end;

The above will rightly not compile. but the following does!

ITestInterface<t> = interface
  ['{9445CED8-4DBA-4EDB-9897-60980B438BE4}']
  procedure Foo1;
  procedure Foo2;
end;

TTest<T> = class(TInterfacedObject, ITestInterface<T>)

end;

Edit: I have just found it it will fail if you try and instantiate TTest. So a little inconsistent, but not that bad!

Upvotes: 1

Views: 439

Answers (1)

Barry Kelly
Barry Kelly

Reputation: 42172

Yes, a bug. http://qc.codegear.com/ is the place to go to report bugs.

Upvotes: 7

Related Questions