On 14.11.2010 17:49, Graeme Geldenhuys wrote:
    * incomplete delegation (non existent in FPC 2.4.2)

I haven't used this for quite a long time, so I can't test it just now... what are you missing?

    * No name resolution (function aliases) of conflicting interfaces

Ehhh... the following code compiles with 2.4.2 and even 2.4.0:

==== source begin ====

program interfacetest;

{$mode objfpc}

uses
  SysUtils;

type
  IMyInterface = interface
    procedure Foo;
  end;

  TMyInterfacedObject = class(TInterfacedObject, IMyInterface)
  public
    procedure IMyInterface.Foo = Bar;
    procedure Bar;
    procedure Foo;
  end;

procedure TMyInterfacedObject.Bar;
begin
  Writeln('Bar');
end;

procedure TMyInterfacedObject.Foo;
begin
  Writeln('Foo');
end;

var
  t: TMyInterfacedObject;
  i: IMyInterface;
begin
  t := TMyInterfacedObject.Create;
  try
    i := t;
    t.Foo;
    i.Foo;
  finally
    t.Free;
  end;
end.

==== source end ====

Output is:

==== output begin ====

Foo
Bar
An unhandled exception occurred at $08056B71 :
EInvalidPointer : Invalid pointer operation
  $08056B71

==== output end ====

(I don't know currently where exactly that EInvalidPointer comes from.... even a "t.AddRef" doesn't solve this...)

Regards,
Sven
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to