peter пре 21 година
родитељ
комит
0690fd145a
4 измењених фајлова са 99 додато и 0 уклоњено
  1. 14 0
      tests/webtbf/tw2946.pp
  2. 34 0
      tests/webtbs/tw3038.pp
  3. 35 0
      tests/webtbs/tw3041.pp
  4. 16 0
      tests/webtbs/tw3045.pp

+ 14 - 0
tests/webtbf/tw2946.pp

@@ -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 - 0
tests/webtbs/tw3038.pp

@@ -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 - 0
tests/webtbs/tw3041.pp

@@ -0,0 +1,35 @@
+{ Source provided for Free Pascal Bug Report 3041 }
+{ Submitted by "C Western" on  2004-04-06 }
+{ e-mail: [email protected] }
+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 - 0
tests/webtbs/tw3045.pp

@@ -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.