summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/tbs/tb0119.pp
blob: 5d46a8a993789ef8e3c0d806e94af52aff800880 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ Old file: tbs0139.pp }
{ Cannot access protected method of ancestor class from other unit. OK 0.99.6 }

unit tb0119;

{$mode objfpc}

 interface
 uses
    ub0119;

 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.