mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 12:09:30 +02:00
* new bugs
This commit is contained in:
parent
da3ef8b6d0
commit
3a72a71c80
33
tests/webtbs/tw2229.pp
Normal file
33
tests/webtbs/tw2229.pp
Normal 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
32
tests/webtbs/tw2285.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user