summaryrefslogtreecommitdiff
path: root/tests/webtbf/tw1483.pp
diff options
context:
space:
mode:
authorfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-16 18:37:41 +0000
committerfpc <fpc@3ad0048d-3df7-0310-abae-a5850022a9f2>2005-05-16 18:37:41 +0000
commitf206a9c2b1ae1d8727ca27a96d448b61fdb4c766 (patch)
treef28256ff9964c1fc7c0f7fb00891268a117b745d /tests/webtbf/tw1483.pp
downloadfpc-f206a9c2b1ae1d8727ca27a96d448b61fdb4c766.tar.gz
initial import
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@1 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/webtbf/tw1483.pp')
-rw-r--r--tests/webtbf/tw1483.pp32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/webtbf/tw1483.pp b/tests/webtbf/tw1483.pp
new file mode 100644
index 0000000000..342df7636d
--- /dev/null
+++ b/tests/webtbf/tw1483.pp
@@ -0,0 +1,32 @@
+{ %fail }
+
+Type pBug=^tBug;
+ tBug=Object
+ Private
+ A:Longint;
+ Go:Procedure Of Object;
+ Procedure Go1;
+ Public
+ Constructor Init;
+ End;
+
+Constructor tBug.Init;
+Begin
+ A:=10;
+ Go:=Go1; { <-- It's wring, it should }
+ { be Go:=@Go1; but compiler }
+ { says it's ok, and the program}
+ { even runs... }
+End;
+
+Procedure tBug.Go1;
+Begin
+ WriteLn(A);
+End;
+
+Var Bug:pBug;
+
+Begin
+ Bug:=New(pBug,Init);
+ Bug^.Go;
+End.