Browse Source

+ Added bug #140

michael 27 years ago
parent
commit
ebd2e9107b
3 changed files with 36 additions and 0 deletions
  1. 21 0
      bugs/bug0140.pp
  2. 14 0
      bugs/bug0140a.pp
  3. 1 0
      bugs/readme.txt

+ 21 - 0
bugs/bug0140.pp

@@ -0,0 +1,21 @@
+unit bug0140;
+
+{ 
+ The first compilation runs fine. 
+ A second compilation (i.e; .ppu files exist already) crashes the compiler !!
+}
+
+interface
+type
+ TObject = object
+  constructor Init(aPar:byte);
+ end;
+implementation
+
+uses bug0140a;
+
+constructor TObject.Init(aPar:byte);
+ begin
+  if aPar=0 then Message(Self);
+ end;
+end.

+ 14 - 0
bugs/bug0140a.pp

@@ -0,0 +1,14 @@
+
+unit bug0140a;
+
+interface
+
+uses bug0140;
+
+procedure Message(var O:TObject);
+
+implementation
+
+procedure Message(var O:TObject);
+ begin writeln('Message') end;
+end.

+ 1 - 0
bugs/readme.txt

@@ -189,3 +189,4 @@ bug0135.pp   Unsupported subrange type construction.
 bug0137.pp   Cannot assign child object variable to parent objcet type variable
 bug0138.pp   with problem, %esi can be crushed and is not restored
 bug0139.pp   Cannot access protected method of ancestor class from other unit.
+bug0140.pp   Shows that interdependent units still are not OK. You need to compile a second time to see the error.