* new bugs

This commit is contained in:
peter 2002-12-27 18:23:48 +00:00
parent da3ef8b6d0
commit 3a72a71c80
2 changed files with 65 additions and 0 deletions

33
tests/webtbs/tw2229.pp Normal file
View File

@ -0,0 +1,33 @@
{ Source provided for Free Pascal Bug Report 2229 }
{ Submitted by "Vincent Snijders" on 2002-11-14 }
{ e-mail: vslist@zonnet.nl }
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
tests/webtbs/tw2285.pp Normal file
View File

@ -0,0 +1,32 @@
{ Source provided for Free Pascal Bug Report 2285 }
{ Submitted by "Sergey Kosarevsky" on 2002-12-25 }
{ e-mail: netsurfer@au.ru }
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.