mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 19:48:08 +02:00
32 lines
542 B
ObjectPascal
32 lines
542 B
ObjectPascal
{$mode objfpc}
|
|
{$warn 6018 off}
|
|
type
|
|
tmyclass = class
|
|
procedure HelloMethod(i : longint);
|
|
end;
|
|
|
|
procedure Hello(i : longint);
|
|
begin
|
|
writeln({$I %CURRENTROUTINE%});
|
|
if {$I %CURRENTROUTINE%}<>'Hello' then
|
|
halt(i);
|
|
end;
|
|
|
|
procedure tmyclass.HelloMethod(i : longint);
|
|
begin
|
|
writeln({$I %CURRENTROUTINE%});
|
|
if {$I %CURRENTROUTINE%}<>'HelloMethod' then
|
|
halt(i);
|
|
end;
|
|
|
|
var
|
|
myclass : tmyclass;
|
|
|
|
begin
|
|
Hello(1);
|
|
myclass:=tmyclass.create;
|
|
myclass.HelloMethod(1);
|
|
myclass.Free;
|
|
writeln('Ok');
|
|
end.
|