Browse Source

* extra test for tw3395

peter 20 years ago
parent
commit
e2c6259fcf
2 changed files with 29 additions and 29 deletions
  1. 29 0
      tests/webtbf/tw3395a.pp
  2. 0 29
      tests/webtbs/tw3395.pp

+ 29 - 0
tests/webtbf/tw3395a.pp

@@ -0,0 +1,29 @@
+{ %fail }
+
+{$mode delphi}
+
+type
+   texec1 = class
+     protected
+       procedure execute;
+     public
+       constructor create;
+   end;
+
+   procedure t(p: pointer);
+     begin
+     end;
+
+   constructor texec1.Create;
+     begin
+       // This should give an invalid typecast, because a methodpointer are 2 pointers
+       t(pointer(execute));
+     end;
+
+   procedure texec1.execute;
+     begin
+     end;
+
+begin
+end.
+

+ 0 - 29
tests/webtbs/tw3395.pp

@@ -1,29 +0,0 @@
-program bug3395;
-
-{$MODE DELPHI}
-{$THREADING ON}
-
-type
-  texec1 = class
-    protected
-      procedure execute;
-    public
-      constructor create;
-  end;
-
-  procedure t(p: pointer);
-    begin
-    end;
-
-  constructor texec1.Create;
-    begin
-      t(@execute);
-    end;
-  
-  procedure texec1.execute;
-    begin
-    end;
-  
-begin
-end.
-