mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 01:59:32 +02:00

allows it, and they're plain pointer-based types -> nil is fine git-svn-id: trunk@21360 -
26 lines
383 B
ObjectPascal
26 lines
383 B
ObjectPascal
{ %target=darwin }
|
|
|
|
{ Objective C types are implicit pointer types -> nil pointer }
|
|
program tdefault15;
|
|
|
|
{$mode objfpc}
|
|
{$modeswitch objectivec1}
|
|
|
|
type
|
|
TTest = objcclass
|
|
end;
|
|
TTestProto = objcprotocol
|
|
end;
|
|
|
|
var
|
|
t: TTest;
|
|
tp: TTestProto;
|
|
begin
|
|
t := Default(TTest);
|
|
if assigned(t) then
|
|
halt(1);
|
|
tp := Default(TTestProto);
|
|
if assigned(tp) then
|
|
halt(2);
|
|
end.
|