mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 04:19:30 +02:00
*** empty log message ***
This commit is contained in:
parent
5351e41f86
commit
dc685940c7
44
bugs/bug0119.pp
Normal file
44
bugs/bug0119.pp
Normal file
@ -0,0 +1,44 @@
|
||||
program ObjTest;
|
||||
uses crt;
|
||||
|
||||
type
|
||||
ObjectA = object
|
||||
procedure Greetings;
|
||||
procedure DoIt;
|
||||
end;
|
||||
ObjectB = object (ObjectA)
|
||||
procedure Greetings;
|
||||
procedure DoIt;
|
||||
end;
|
||||
|
||||
procedure ObjectA.Greetings;
|
||||
begin
|
||||
writeln(' A');
|
||||
end;
|
||||
procedure ObjectA.DoIt;
|
||||
begin
|
||||
writeln('A ');
|
||||
Greetings;
|
||||
end;
|
||||
|
||||
procedure ObjectB.Greetings;
|
||||
begin
|
||||
writeln(' B');
|
||||
end;
|
||||
procedure ObjectB.DoIt;
|
||||
begin
|
||||
writeln('B');
|
||||
Greetings;
|
||||
end;
|
||||
|
||||
var
|
||||
A: ObjectA;
|
||||
B: ObjectB;
|
||||
|
||||
begin
|
||||
A.DoIt;
|
||||
B.DoIt;
|
||||
writeln; writeln('Now doing it directly:');
|
||||
A.Greetings;
|
||||
B.Greetings;
|
||||
end.
|
@ -164,4 +164,4 @@ bug0115.pp missing writeln for comp data type
|
||||
bug0117.pp internalerror 17 (and why is there an automatic float
|
||||
conversion?)
|
||||
bug0118.pp Procedural vars cannot be assigned nil ?
|
||||
|
||||
bug0119.pp problem with methods
|
||||
|
Loading…
Reference in New Issue
Block a user