fpc/tests/webtbs/tw16366.pp
Jonas Maebe 0b44f8db1f * don't give an internal error when creating a dynamic array or a
record that requires init/finalisation with an objcclass
    (mantis #16366)

git-svn-id: trunk@15202 -
2010-05-02 13:42:03 +00:00

22 lines
390 B
ObjectPascal

{ %target=darwin }
{ %cpu=powerpc,powerpc64,i386,x86_64,arm }
{$mode objfpc}
{$modeswitch objectivec1}
type
ta = array of nsobject;
var
a: ta;
i: longint;
begin
setlength(a,5);
for i := low(a) to high(a) do
begin
if a[i]<>nil then
halt(1);
{ crash if the rtl tries to "finalise" the nsobject elements }
a[i]:=nsobject(i*10000+12345);
end;
end.