mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 12:29:55 +02:00
* new bugs
This commit is contained in:
parent
3379959c50
commit
0690fd145a
14
tests/webtbf/tw2946.pp
Normal file
14
tests/webtbf/tw2946.pp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
{ Source provided for Free Pascal Bug Report 2946 }
|
||||||
|
{ Submitted by "Marco (Gory Bugs Department)" on 2004-02-06 }
|
||||||
|
{ e-mail: }
|
||||||
|
|
||||||
|
{$ifdef fpc}{$mode Delphi}{$endif}
|
||||||
|
var p:array of pchar;
|
||||||
|
t: ^pchar;
|
||||||
|
begin
|
||||||
|
{ This generates code that will crash, so a compile
|
||||||
|
time error is the correct solution }
|
||||||
|
p:=pointer(t);
|
||||||
|
end.
|
34
tests/webtbs/tw3038.pp
Normal file
34
tests/webtbs/tw3038.pp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 3038 }
|
||||||
|
{ Submitted by "Marco (Gory Bugs Department)" on 2004-04-03 }
|
||||||
|
{ e-mail: }
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
type dasso = class
|
||||||
|
procedure bla; virtual; abstract;
|
||||||
|
end;
|
||||||
|
dmyasso = class(dasso)
|
||||||
|
procedure bla; override;
|
||||||
|
end;
|
||||||
|
dnextasso = class(dmyasso)
|
||||||
|
procedure bla; override;
|
||||||
|
end;
|
||||||
|
ClassFamily= class of dasso;
|
||||||
|
|
||||||
|
procedure dmyasso.bla;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure dnextasso.bla;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
const cmyclass : array[0..1] of classfamily =(dmyasso,dnextasso);
|
||||||
|
|
||||||
|
var vmyclass : array[0..1] of classfamily =(dmyasso,dnextasso);
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
35
tests/webtbs/tw3041.pp
Normal file
35
tests/webtbs/tw3041.pp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 3041 }
|
||||||
|
{ Submitted by "C Western" on 2004-04-06 }
|
||||||
|
{ e-mail: mftq75@dsl.pipex.com }
|
||||||
|
program bug2;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
uses
|
||||||
|
Classes;
|
||||||
|
type
|
||||||
|
TMyCollectionItem = class(TCollectionItem)
|
||||||
|
public
|
||||||
|
procedure Assign(Source: TPersistent); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TMyCollectionItem.Assign(Source: TPersistent);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
A, B: TCollection;
|
||||||
|
C: TMyCollectionItem;
|
||||||
|
begin
|
||||||
|
A := TCollection.Create(TMyCollectionItem);
|
||||||
|
B := TCollection.Create(TMyCollectionItem);
|
||||||
|
C := TMyCollectionItem.Create(A);
|
||||||
|
Writeln(A.Count);
|
||||||
|
B.Assign(A);
|
||||||
|
Writeln(B.Count);
|
||||||
|
if B.Count<>A.Count then
|
||||||
|
begin
|
||||||
|
writeln('Error!');
|
||||||
|
halt(1);
|
||||||
|
end;
|
||||||
|
end.
|
16
tests/webtbs/tw3045.pp
Normal file
16
tests/webtbs/tw3045.pp
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ Source provided for Free Pascal Bug Report 3045 }
|
||||||
|
{ Submitted by "marco" on 2004-04-10 }
|
||||||
|
{ e-mail: }
|
||||||
|
|
||||||
|
{$mode delphi}
|
||||||
|
procedure raiselastwin32error;
|
||||||
|
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
const raiselastoserror : procedure = raiselastwin32error; // ok
|
||||||
|
|
||||||
|
var varraiselastoserror : procedure = raiselastwin32error; // fail
|
||||||
|
|
||||||
|
begin
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user