mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 01:39:27 +02:00
* new bugs
This commit is contained in:
parent
9ab6f93a11
commit
877551b144
9
tests/tbf/tb0167.pp
Normal file
9
tests/tbf/tb0167.pp
Normal file
@ -0,0 +1,9 @@
|
||||
{ %fail }
|
||||
|
||||
procedure p(var a);
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
p([1]);
|
||||
end.
|
16
tests/webtbf/tw3267.pp
Normal file
16
tests/webtbf/tw3267.pp
Normal file
@ -0,0 +1,16 @@
|
||||
{ %fail }
|
||||
|
||||
{ Source provided for Free Pascal Bug Report 3267 }
|
||||
{ Submitted by "Karoly Balogh" on 2004-08-22 }
|
||||
{ e-mail: charlie@scenergy.dfmk.hu }
|
||||
program test;
|
||||
|
||||
const VALUE : cardinal = 1;
|
||||
|
||||
procedure bug(var p: array of cardinal);
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
bug([VALUE]);
|
||||
end.
|
19
tests/webtbs/tw3259.pp
Normal file
19
tests/webtbs/tw3259.pp
Normal file
@ -0,0 +1,19 @@
|
||||
{ Source provided for Free Pascal Bug Report 3259 }
|
||||
{ Submitted by "Andreas Hausladen" on 2004-08-18 }
|
||||
{ e-mail: Andreas.Hausladen@gmx.de }
|
||||
|
||||
{$mode objfpc}
|
||||
|
||||
unit tw3259;
|
||||
interface
|
||||
|
||||
implementation
|
||||
|
||||
function MyFunc(forward: Integer): Integer; forward;
|
||||
|
||||
function MyFunc(forward: Integer): Integer;
|
||||
begin
|
||||
Result := forward;
|
||||
end;
|
||||
|
||||
end.
|
45
tests/webtbs/tw3263.pp
Normal file
45
tests/webtbs/tw3263.pp
Normal file
@ -0,0 +1,45 @@
|
||||
{ Source provided for Free Pascal Bug Report 3263 }
|
||||
{ Submitted by "Frank Kintrup" on 2004-08-20 }
|
||||
{ e-mail: frank.kintrup@gmx.de }
|
||||
{$MODE Delphi}
|
||||
type
|
||||
TAncestor = class (TObject)
|
||||
constructor Create; virtual; overload;
|
||||
end;
|
||||
|
||||
type
|
||||
TDerived = class (TAncestor)
|
||||
constructor Create; override; overload;
|
||||
constructor Create(aParam : Integer); overload;
|
||||
end;
|
||||
|
||||
var
|
||||
err : boolean;
|
||||
|
||||
constructor TAncestor.Create;
|
||||
begin
|
||||
writeln('TAnscestor.Create');
|
||||
err:=false;
|
||||
end;
|
||||
|
||||
constructor TDerived.Create;
|
||||
begin
|
||||
writeln('TDerived.Create');
|
||||
inherited Create; // Calls TAncestor.Create
|
||||
end;
|
||||
|
||||
constructor TDerived.Create(aParam : Integer);
|
||||
begin
|
||||
// Should call virtual TDerived.Create
|
||||
// Compiler stops here "Illegal expression"
|
||||
writeln('TDerived.Create(aParam)');
|
||||
Create;
|
||||
end;
|
||||
|
||||
var D : TDerived;
|
||||
begin
|
||||
err:=true;
|
||||
D := TDerived.Create(0);
|
||||
if err then
|
||||
halt(1);
|
||||
end.
|
13
tests/webtbs/tw3265.pp
Normal file
13
tests/webtbs/tw3265.pp
Normal file
@ -0,0 +1,13 @@
|
||||
{$MODE Delphi}
|
||||
type
|
||||
TTest = class (TObject)
|
||||
procedure Test; deprecated;
|
||||
end;
|
||||
|
||||
procedure TTest.Test;
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user