mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:47:53 +02:00

record that requires init/finalisation with an objcclass (mantis #16366) git-svn-id: trunk@15202 -
22 lines
390 B
ObjectPascal
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.
|