fpc/tests/webtbs/tw1863.pp
fpc 790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00

56 lines
624 B
ObjectPascal

type
TObj = object
constructor Init0;
constructor Init;
procedure Show;
function GetStr:string; virtual;
destructor Done;
end;
TChild = object (TObj)
function GetStr:string; virtual;
end;
var
Err : boolean;
constructor TObj.Init0;
begin
end;
constructor TObj.Init;
begin
Init0;
end;
function TObj.GetStr:string;
begin
GetStr:='Bad';
Err:=true;
end;
procedure TObj.Show;
begin
writeln(GetStr);
end;
destructor TObj.Done;
begin
end;
function TChild.GetStr:string;
begin
GetStr:='Good'
end;
var
Obj:TChild;
begin
Obj.Init;
Obj.Show;
Obj.Done;
if Err then
halt(1);
end.