michael 27 years ago
parent
commit
9f405c2bb0
3 changed files with 45 additions and 0 deletions
  1. 21 0
      bugs/bug0139.pp
  2. 22 0
      bugs/bug0139a.pp
  3. 2 0
      bugs/readme.txt

+ 21 - 0
bugs/bug0139.pp

@@ -0,0 +1,21 @@
+unit unit2;
+ 
+ interface
+ uses
+    objpas, bug0139a;
+ 
+ type
+    AnotherClass=class(SomeClass)
+    protected
+    procedure doSomething; override;
+    end ;
+ 
+ implementation
+ 
+ procedure AnotherClass.doSomething;
+ begin
+ inherited doSomething;  // this causes the error: " can not call protected
+                         //  method from here " ( or something similar )
+ end ;
+
+end.

+ 22 - 0
bugs/bug0139a.pp

@@ -0,0 +1,22 @@
+ unit bug0139a;
+ 
+ interface
+ 
+ uses
+    objpas;
+ 
+ type
+    SomeClass=class(TObject)
+    protected
+    procedure doSomething; virtual;
+    end ;
+ 
+ implementation
+ 
+ 
+ procedure SomeClass.doSomething;
+ begin
+   Writeln ('Hello from SomeClass.DoSomething');
+ end ;
+
+end.

+ 2 - 0
bugs/readme.txt

@@ -187,3 +187,5 @@ bug0131.pp   internal error 10 with highdimension arrays
 bug0132.pp   segmentation fault with type loop
 bug0135.pp   Unsupported subrange type construction.
 bug0137.pp   Cannot assign child object variable to parent objcet type variable
+bug0138.pp   ?? Peter ??
+bug0139.pp   Cannot access protected method of ancestor class from other unit.