mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 02:28:14 +02:00
* new bug
This commit is contained in:
parent
97260ca1bf
commit
2bb1472ab5
55
tests/tbs/tb0479.pp
Normal file
55
tests/tbs/tb0479.pp
Normal file
@ -0,0 +1,55 @@
|
||||
{$mode delphi}
|
||||
|
||||
var
|
||||
err : boolean;
|
||||
|
||||
Type
|
||||
{copy-paste from LibX.pas}
|
||||
XInt = Longint;
|
||||
XUInt = Longword;
|
||||
XHandle = Pointer;
|
||||
XFile = XHandle;
|
||||
XFileMode = Set Of (
|
||||
xFileModeRead,
|
||||
xFileModeWrite
|
||||
);
|
||||
XResult = XInt;
|
||||
|
||||
Type
|
||||
TTest = Class(TObject)
|
||||
Constructor Create(Out Result: XResult; Const Handle: XFile; Const Mode: XFileMode);
|
||||
End;
|
||||
|
||||
TTest2 = Class(TTest)
|
||||
Constructor Create(Out Result: XResult; Const FileName: AnsiString; Const Rights: XUInt); Overload;
|
||||
Constructor Create(Out Result: XResult; Const FileName: AnsiString; Const Mode: XFileMode); Overload;
|
||||
End;
|
||||
|
||||
Constructor TTest.Create(Out Result: XResult; Const Handle: XFile; Const Mode: XFileMode);
|
||||
Begin
|
||||
WriteLn('TTest Create');
|
||||
End;
|
||||
|
||||
Constructor TTest2.Create(Out Result: XResult; Const FileName: AnsiString; Const Rights: XUInt);
|
||||
Begin
|
||||
WriteLn('TTest2-1 Create');
|
||||
End;
|
||||
|
||||
Constructor TTest2.Create(Out Result: XResult; Const FileName: AnsiString; Const Mode: XFileMode);
|
||||
Begin
|
||||
WriteLn('TTest2-2 Create');
|
||||
err:=false;
|
||||
End;
|
||||
|
||||
Var
|
||||
T : TTest;
|
||||
C : PAnsiChar;
|
||||
X : XResult;
|
||||
M : XFileMode;
|
||||
Begin
|
||||
err:=true;
|
||||
C := 'Foo';
|
||||
T := TTest2.Create(X, C, M);
|
||||
if err then
|
||||
halt(1);
|
||||
End.
|
34
tests/webtbs/tw3165.pp
Normal file
34
tests/webtbs/tw3165.pp
Normal file
@ -0,0 +1,34 @@
|
||||
{ Source provided for Free Pascal Bug Report 3165 }
|
||||
{ Submitted by "" on 2004-06-13 }
|
||||
{ e-mail: plugwash@p10link.net }
|
||||
program testwith;
|
||||
|
||||
{$ifdef fpc}{$mode objfpc}{$endif}
|
||||
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
type
|
||||
tconnect4game=class
|
||||
board : array[1..7,0..5] of byte;
|
||||
end;
|
||||
|
||||
var
|
||||
row ,col: byte;
|
||||
g : tconnect4game;
|
||||
|
||||
begin
|
||||
{g := tconnect4game.create;}
|
||||
with {g} tconnect4game.create do begin
|
||||
|
||||
writeln(board[1,5]);
|
||||
row :=1;
|
||||
col :=5;
|
||||
writeln(board[col,row]);
|
||||
for row := 5 downto 0 do begin
|
||||
for col := 1 to 7 do begin
|
||||
writeln(' :in inner loop row='+inttostr(row)+' col='+inttostr(col)+' board[col,row]='+inttostr(board[col,row]));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end.
|
Loading…
Reference in New Issue
Block a user