mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 03:28:40 +02:00
* allow default() on Objective-C classes and protocols: the compiler already
allows it, and they're plain pointer-based types -> nil is fine git-svn-id: trunk@21360 -
This commit is contained in:
parent
0757517dde
commit
1ec48299cf
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10533,7 +10533,6 @@ tests/test/tdefault12.pp svneol=native#text/pascal
|
||||
tests/test/tdefault13.pp svneol=native#text/pascal
|
||||
tests/test/tdefault14.pp svneol=native#text/pascal
|
||||
tests/test/tdefault15.pp svneol=native#text/pascal
|
||||
tests/test/tdefault16.pp svneol=native#text/pascal
|
||||
tests/test/tdefault2.pp svneol=native#text/pascal
|
||||
tests/test/tdefault3.pp svneol=native#text/pascal
|
||||
tests/test/tdefault4.pp svneol=native#text/pascal
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ %FAIL }
|
||||
{ %target=darwin }
|
||||
|
||||
{ Objective C types are disallowed as well }
|
||||
{ Objective C types are implicit pointer types -> nil pointer }
|
||||
program tdefault15;
|
||||
|
||||
{$mode objfpc}
|
||||
@ -10,9 +9,17 @@ program tdefault15;
|
||||
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.
|
||||
|
@ -1,18 +0,0 @@
|
||||
{ %FAIL }
|
||||
{ %target=darwin }
|
||||
|
||||
{ Objective C types are disallowed as well }
|
||||
program tdefault16;
|
||||
|
||||
{$mode objfpc}
|
||||
{$modeswitch objectivec1}
|
||||
|
||||
type
|
||||
TTest = objcprotocol
|
||||
end;
|
||||
|
||||
var
|
||||
t: TTest;
|
||||
begin
|
||||
t := Default(TTest);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user