mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-05 08:18:12 +02:00
20 lines
306 B
ObjectPascal
20 lines
306 B
ObjectPascal
program tprocvar16;
|
|
|
|
{$mode delphi}
|
|
|
|
type C = class
|
|
class procedure Foo;
|
|
end;
|
|
class procedure C.Foo; begin end;
|
|
|
|
type CC = class of C;
|
|
|
|
var Z: procedure of object;
|
|
begin
|
|
Z := CC.Foo;
|
|
if TMethod(Z).Code <> @C.Foo then
|
|
Halt(1);
|
|
if TMethod(Z).Data <> Pointer(C) then
|
|
Halt(2);
|
|
end.
|