Browse Source

+ 263,264

peter 26 years ago
parent
commit
39630ae945
3 changed files with 62 additions and 1 deletions
  1. 15 0
      bugs/bug0263.pp
  2. 44 0
      bugs/bug0264.pp
  3. 3 1
      bugs/readme.txt

+ 15 - 0
bugs/bug0263.pp

@@ -0,0 +1,15 @@
+library bug0263;
+
+{
+  The export directive is not necessary anymore in delphi, it's a leftover
+  from the 16bit model, just like near and far.
+}
+
+procedure p;
+begin
+end;
+
+exports
+  p name 'p';
+
+end.

+ 44 - 0
bugs/bug0264.pp

@@ -0,0 +1,44 @@
+{$MODE DELPHI}
+
+type
+    a = class
+        c : procedure of object;
+
+        constructor create; virtual;
+        destructor destroy; override;
+
+        procedure e; virtual;
+        procedure f; virtual;
+    end;
+
+constructor a.create;
+begin
+    c := @e;
+end;
+
+destructor a.destroy;
+begin
+end;
+
+procedure a.e;
+begin
+    Writeln('E');
+    c := @f;
+end;
+
+procedure a.f;
+begin
+    Writeln('F');
+    c := @e;
+end;
+
+var
+    z : a;
+
+begin
+    z := a.create;
+    z.c;
+    z.c;
+    z.c;
+    z.free;
+end.

+ 3 - 1
bugs/readme.txt

@@ -351,4 +351,6 @@ bug0245.pp   assigning pointers to address of consts is allowed (refused by BP !
 bug0246.pp   const para can be changed without error
 bug0252.pp   typecasting not possible within typed const
 bug0261.pp   problems for assignment overloading
-bug0262.pp   problems with virtual and overloaded methods
+bug0262.pp   problems with virtual and overloaded methods
+bug0263.pp   export directive is not necessary in delphi anymore
+bug0264.pp   methodpointer bugs