fpc/tests/webtbs/tw29245.pp
Jonas Maebe cb7730a423 * fixed execution order of implicit finalization and class destructors: first
the latter, then the former

git-svn-id: trunk@38716 -
2018-04-08 15:41:00 +00:00

37 lines
521 B
ObjectPascal

{ %opt=-gh }
{$mode delphi}
uses
uw29245;
type
TBar = class
class var
F: array of TObject;
strict private
class constructor Create;
class destructor Destroy;
end;
class constructor TBar.Create;
begin
writeln('tbar class constructor');
SetLength(F, 10);
end;
class destructor TBar.Destroy;
begin
writeln('tbar class destructor');
if length(Tbar.F)<>10 then
halt(5);
end;
begin
HaltOnNotReleased := true;
writeln('main program');
if length(TBar.F)<>10 then
halt(4);
end.