mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 15:47:53 +02:00
Added bug #139
This commit is contained in:
parent
ce75b83d12
commit
9f405c2bb0
21
bugs/bug0139.pp
Normal file
21
bugs/bug0139.pp
Normal file
@ -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
bugs/bug0139a.pp
Normal file
22
bugs/bug0139a.pp
Normal file
@ -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.
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user