* 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:
Jonas Maebe 2016-04-17 19:07:26 +00:00
parent e38e051425
commit f50dec5202
3 changed files with 24 additions and 0 deletions

1
.gitattributes vendored
View File

@ -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

View File

@ -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
View 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.