fpc/tests/tbs/tb0611.pp
florian b61fd60b9d + support for {$I %CURRENTROUTINE%}
* if chain changed into case statements

git-svn-id: trunk@30873 -
2015-05-16 22:22:26 +00:00

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.