Browse Source

* new bugs

peter 22 years ago
parent
commit
3a72a71c80
2 changed files with 65 additions and 0 deletions
  1. 33 0
      tests/webtbs/tw2229.pp
  2. 32 0
      tests/webtbs/tw2285.pp

+ 33 - 0
tests/webtbs/tw2229.pp

@@ -0,0 +1,33 @@
+{ Source provided for Free Pascal Bug Report 2229 }
+{ Submitted by "Vincent Snijders" on  2002-11-14 }
+{ e-mail: [email protected] }
+program reraise;
+
+{$mode objfpc}
+{$H+}
+
+uses
+  SysUtils;
+
+procedure raiseexception;
+var
+  x: integer;
+begin
+  try
+    x := 1;
+    raise Exception.Create('Bug?');
+  except
+    on E: Exception  do
+    begin
+      if  x=1 then
+      //begin 
+        raise
+      //end  
+      else writeln('Do nothing')
+    end
+  end;
+end;
+
+begin
+  raiseexception;
+end.

+ 32 - 0
tests/webtbs/tw2285.pp

@@ -0,0 +1,32 @@
+{ Source provided for Free Pascal Bug Report 2285 }
+{ Submitted by "Sergey Kosarevsky" on  2002-12-25 }
+{ e-mail: [email protected] }
+Type CLASS_CONSTRUCTOR=Function(Param:String):Boolean Of Object;
+
+Type tObject=Object
+        Constructor Init(Param:String);
+     End;
+
+var
+  a,b : longint;
+
+Constructor tObject.Init(Param:String);
+Begin
+End;
+
+Procedure CheckConstructor(C:CLASS_CONSTRUCTOR);
+Begin
+   a:=Longint(Pointer(C));
+   WriteLn('a: ',a);
+End;
+
+Begin
+   CheckConstructor(@tObject.Init);
+   b:=Longint(Pointer(@tObject.Init));
+   WriteLn('b: ',b);
+   if a<>b then
+    begin
+      writeln('Error!');
+      halt(1);
+    end;  
+End.