Browse Source

* new bugs

peter 22 years ago
parent
commit
5e45fbb32e
2 changed files with 42 additions and 0 deletions
  1. 31 0
      tests/webtbs/tw2030.pp
  2. 11 0
      tests/webtbs/tw2397.pp

+ 31 - 0
tests/webtbs/tw2030.pp

@@ -0,0 +1,31 @@
+{ Source provided for Free Pascal Bug Report 2030 }
+{ Submitted by "Michalis Kamburelis" on  2002-07-06 }
+{ e-mail: [email protected] }
+program wrong_delphi_overloads_handling;
+
+{$mode delphi} 
+{under objfpc mode there will be no bug}
+
+const
+  err : boolean = true;
+  
+procedure p;            overload; forward;
+procedure p(a:integer); overload; forward;
+
+{ it doesn't matter if we add clause "overload" 
+  to p's definitions below; the error will still 
+  prevent this code from compiling }
+
+procedure p;
+begin
+  err:=false;
+end;
+
+procedure p(a:integer); overload;
+begin end;
+
+begin
+  p;
+  if err then
+   halt(1);
+end.

+ 11 - 0
tests/webtbs/tw2397.pp

@@ -0,0 +1,11 @@
+{ Source provided for Free Pascal Bug Report 2397 }
+{ Submitted by "Yakov Sudeikin" on  2003-02-23 }
+{ e-mail: [email protected] }
+
+{$mode delphi}
+
+var
+ a: array of string = nil; //Only works in Delphi
+begin
+ a := nil; //works in FPC and Delphi
+end.