summaryrefslogtreecommitdiff
path: root/tests/webtbf/tw30022.pp
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2016-04-17 19:07:26 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2016-04-17 19:07:26 +0000
commita2c1b397f9d4f3acda01d8f6a3cc25bf52970aaa (patch)
tree8bda6896904c6cf769d5d44d7c8788b143ee944f /tests/webtbf/tw30022.pp
parent6e207803bef8fa292196c5e55e02ec67282f2a33 (diff)
downloadfpc-a2c1b397f9d4f3acda01d8f6a3cc25bf52970aaa.tar.gz
* 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: http://svn.freepascal.org/svn/fpc/trunk@33529 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/webtbf/tw30022.pp')
-rw-r--r--tests/webtbf/tw30022.pp22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/webtbf/tw30022.pp b/tests/webtbf/tw30022.pp
new file mode 100644
index 0000000000..a0d8b02b71
--- /dev/null
+++ b/tests/webtbf/tw30022.pp
@@ -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.