瀏覽代碼

* new bugs

peter 21 年之前
父節點
當前提交
877551b144
共有 5 個文件被更改,包括 102 次插入0 次删除
  1. 9 0
      tests/tbf/tb0167.pp
  2. 16 0
      tests/webtbf/tw3267.pp
  3. 19 0
      tests/webtbs/tw3259.pp
  4. 45 0
      tests/webtbs/tw3263.pp
  5. 13 0
      tests/webtbs/tw3265.pp

+ 9 - 0
tests/tbf/tb0167.pp

@@ -0,0 +1,9 @@
+{ %fail }
+
+procedure p(var a);
+begin 
+end; 
+
+begin
+  p([1]); 
+end. 

+ 16 - 0
tests/webtbf/tw3267.pp

@@ -0,0 +1,16 @@
+{ %fail }
+
+{ Source provided for Free Pascal Bug Report 3267 }
+{ Submitted by "Karoly Balogh" on  2004-08-22 }
+{ e-mail: [email protected] }
+program test;
+
+const VALUE : cardinal = 1;
+
+procedure bug(var p: array of cardinal);
+begin
+end;
+
+begin
+ bug([VALUE]);
+end.

+ 19 - 0
tests/webtbs/tw3259.pp

@@ -0,0 +1,19 @@
+{ Source provided for Free Pascal Bug Report 3259 }
+{ Submitted by "Andreas Hausladen" on  2004-08-18 }
+{ e-mail: [email protected] }
+
+{$mode objfpc}
+
+unit tw3259;
+interface
+
+implementation
+
+function MyFunc(forward: Integer): Integer; forward;
+
+function MyFunc(forward: Integer): Integer;
+begin
+  Result := forward;
+end;
+
+end.

+ 45 - 0
tests/webtbs/tw3263.pp

@@ -0,0 +1,45 @@
+{ Source provided for Free Pascal Bug Report 3263 }
+{ Submitted by "Frank Kintrup" on  2004-08-20 }
+{ e-mail: [email protected] }
+{$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 - 0
tests/webtbs/tw3265.pp

@@ -0,0 +1,13 @@
+{$MODE Delphi}
+type
+  TTest = class (TObject)
+    procedure Test; deprecated;
+  end;
+
+procedure TTest.Test;
+begin
+end;
+
+begin
+end.
+