fpc/tests/webtbs/tw12048.pp
Jonas Maebe f9b4d58e98 * set finalized dynarrays to nil (mantis #12048)
git-svn-id: trunk@11773 -
2008-09-13 20:01:47 +00:00

25 lines
350 B
ObjectPascal

{ %opt=-gh }
{$mode objfpc}
program DynArrBug;
uses Types;
function GetDynArray: TStringDynArray;
begin
SetLength( GetDynArray, 16 );
end;
var
darr: array[1..1] of TStringDynArray;
begin
keepreleased:=true;
darr[1] := GetDynArray();
Finalize( darr[1] );
if pointer(darr[1])<>nil then
halt(1);
darr[1] := GetDynArray();
end.