summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw16366.pp
blob: 369b3f0d8f24c3a26e2bafaf9ccab47c9b03f65e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ %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.