summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/uw3184a.pp
blob: 139f8a9a8369152ae3896d82b381e73946f64d7a (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{ Source provided for Free Pascal Bug Report 3184 }
{ Submitted by "Martin Schreiber" on  2004-06-25 }
{ e-mail:  }
unit uw3184a;

{$ifdef fpc}{$mode objfpc}{$H+}{$endif}

interface


type
 tclass0 = class
  private
   function proc:longint; virtual;
 end;

 tclass1 = class(tclass0)
  protected   //same behaviour if private
   function proc:longint override;
  public
   function proc1:longint;
 end;

implementation

function tclass0.proc:longint;
begin
 writeln('tclass0.proc');
 result:=0;
end;

function tclass1.proc:longint;
begin
 writeln('tclass1.proc');
 result:=10;
end;

function tclass1.proc1:longint;
begin
 result:=proc;
end;

end.