浏览代码

+ 293,294,295

peter 26 年之前
父节点
当前提交
0950b2201a
共有 4 个文件被更改,包括 56 次插入1 次删除
  1. 28 0
      bugs/bug0293.pp
  2. 7 0
      bugs/bug0294.pp
  3. 18 0
      bugs/bug0295.pp
  4. 3 1
      bugs/readme.txt

+ 28 - 0
bugs/bug0293.pp

@@ -0,0 +1,28 @@
+program bug0293;
+
+{$ifdef fpc}{$mode objfpc}{$endif}
+
+TYPE  Ttype = class
+              field :LONGINT;
+              CONSTRUCTOR DOSOMETHING;
+              END;
+
+CONSTRUCTOR TTYPE.DOSOMETHING;
+BEGIN
+END;
+
+var
+  longint : longint;
+
+procedure p;
+VAR
+  TTYPE : TTYPE;
+BEGIn
+  ttype:=ttype.dosomething;
+END;
+
+begin
+  p;
+end.
+
+

+ 7 - 0
bugs/bug0294.pp

@@ -0,0 +1,7 @@
+function test(test:longint):longint;
+begin
+  test:=1;
+end;
+
+begin
+end.

+ 18 - 0
bugs/bug0295.pp

@@ -0,0 +1,18 @@
+type
+  t1=longint;
+
+procedure p;
+type
+  pt1=^t1;
+  t1=string;
+var
+  t : t1;
+  p : pt1;
+begin
+  p:=@t;
+  p^:='test';
+end;
+
+begin
+  p;
+end.

+ 3 - 1
bugs/readme.txt

@@ -365,7 +365,7 @@ bug0243.pp   Arguments of functions are computed from right to left this
              but only BP respects this convention Delphi and GPC also
              use right to left pushing !!
 bug0290.pp   problem with storing hex numbers in integers
-
+bug0294.pp   parameter with the same name as function is allowed in tp7/delphi
 
 Wishlist bugs:
 --------------
@@ -382,3 +382,5 @@ bug0262.pp   problems with virtual and overloaded methods
 bug0263.pp   export directive is not necessary in delphi anymore
 bug0265.pp   nested proc with for-counter in other lex level
 bug0281.pp   dup id checking with property is wrong
+bug0293.pp   no error with variable name = type name
+bug0295.pp   forward type definition is resolved wrong