fpc/tests/webtbs/tw24536.pp
2016-07-05 22:11:28 +00:00

22 lines
428 B
ObjectPascal

{$ifdef fpc}{$mode objfpc}{$endif}
type
TMyClass = class
procedure MyAbstractMethod; virtual; abstract;
procedure MyAbstractMethod2; virtual; abstract;
end;
TMyClass2 = class(TMyClass)
end;
var
Foo,Foo2: CodePointer;
begin
Foo := @TMyClass.MyAbstractMethod;
Foo2 := @TMyClass.MyAbstractMethod2;
if Foo=Foo2 then
Halt(1);
Foo2 := @TMyClass2.MyAbstractMethod;
if Foo<>Foo2 then
Halt(2);
end.