Browse Source

* new bug

peter 20 years ago
parent
commit
cc33cec223
2 changed files with 31 additions and 0 deletions
  1. 3 0
      tests/tbf/tb0168.pp
  2. 28 0
      tests/webtbf/tw3395.pp

+ 3 - 0
tests/tbf/tb0168.pp

@@ -1,7 +1,10 @@
 { %fail }
 
+{$mode fpc}
+
 var c: char;
     p: pchar;
 begin
+  { Don't allow this in fpc modes, in delphi it should be allowed }
   p := pchar(c);
 end.

+ 28 - 0
tests/webtbf/tw3395.pp

@@ -0,0 +1,28 @@
+{ %fail }
+
+{$MODE DELPHI}
+
+type
+   texec1 = class
+     protected
+       procedure execute;
+     public
+       constructor create;
+   end;
+
+   procedure t(p: pointer);
+     begin
+     end;
+
+   constructor texec1.Create;
+     begin
+       { THis is not allowed }
+       t(@execute);
+     end;
+
+   procedure texec1.execute;
+     begin
+     end;
+
+begin
+end.