fpc/tests/tbs/tb0125.pp
2000-11-30 22:38:14 +00:00

25 lines
375 B
ObjectPascal

{ Old file: tbs0144.pp }
{ problem with 'with object do' OK 0.99.7 (PFV) }
program done_bug;
type
TObject = object
Constructor Init;
Destructor Done;
end;
PObject = ^TObject;
Constructor TObject.Init;
begin end;
Destructor TObject.Done;
begin end;
var P:PObject;
begin
New(P,Init);
with P^ do Done; { Compiler PANIC here ! }
Dispose(P);
end.