mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 05:59:28 +02:00
* don't allow implicit type conversions from pointers to c-style blocks in
Delphi mode, because unlike for procvars we need full type information to be able to generate a block (mantis #30022) git-svn-id: trunk@33529 -
This commit is contained in:
parent
e38e051425
commit
f50dec5202
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -13569,6 +13569,7 @@ tests/webtbf/tw2972b.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2983a.pp svneol=native#text/plain
|
||||
tests/webtbf/tw2996.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3000.pp svneol=native#text/plain
|
||||
tests/webtbf/tw30022.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3047.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3114.pp svneol=native#text/plain
|
||||
tests/webtbf/tw3116.pp svneol=native#text/plain
|
||||
|
@ -6355,6 +6355,7 @@ implementation
|
||||
function tprocvardef.is_addressonly:boolean;
|
||||
begin
|
||||
result:=(not(po_methodpointer in procoptions) and
|
||||
not(po_is_block in procoptions) and
|
||||
not is_nested_pd(self)) or
|
||||
(po_addressonly in procoptions);
|
||||
end;
|
||||
|
22
tests/webtbf/tw30022.pp
Normal file
22
tests/webtbf/tw30022.pp
Normal file
@ -0,0 +1,22 @@
|
||||
{ %fail }
|
||||
|
||||
{ %target=darwin }
|
||||
|
||||
{$mode delphi}
|
||||
{$modeswitch objectivec1}
|
||||
{$modeswitch cblocks}
|
||||
|
||||
type
|
||||
treadabilityHandler = reference to procedure (l :longint); cdecl;
|
||||
|
||||
procedure setReadabilityHandler(ahandler: treadabilityHandler);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure MyHandler(l: longint);
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
setReadabilityHandler(@myhandler)
|
||||
end.
|
Loading…
Reference in New Issue
Block a user