mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-24 06:39:36 +02:00
Added bug #137
This commit is contained in:
parent
804a6a36dc
commit
131e87ba6f
45
bugs/bug0137.pp
Normal file
45
bugs/bug0137.pp
Normal file
@ -0,0 +1,45 @@
|
||||
program OO_Test;
|
||||
|
||||
Type TVater = Object
|
||||
Constructor Init;
|
||||
Procedure Gehen; Virtual;
|
||||
Procedure Laufen; Virtual;
|
||||
End;
|
||||
|
||||
TSohn = Object(TVater)
|
||||
Procedure Gehen; Virtual;
|
||||
End;
|
||||
|
||||
Var V : TVater;
|
||||
S : TSohn;
|
||||
|
||||
Constructor TVater.Init;
|
||||
Begin
|
||||
End;
|
||||
|
||||
Procedure TVater.Gehen;
|
||||
Begin
|
||||
Writeln('langsam gehen');
|
||||
End;
|
||||
|
||||
Procedure TVater.Laufen;
|
||||
Begin
|
||||
Gehen;
|
||||
Gehen;
|
||||
End;
|
||||
|
||||
Procedure TSohn.Gehen;
|
||||
Begin
|
||||
Writeln('schnell gehen');
|
||||
End;
|
||||
|
||||
Begin
|
||||
V.Init;
|
||||
S.Init;
|
||||
V.Laufen;
|
||||
Writeln;
|
||||
S.Laufen;
|
||||
Writeln;
|
||||
V := S;
|
||||
V.Gehen;
|
||||
End.
|
@ -182,4 +182,5 @@ bug0131.pp internal error 10 with highdimension arrays
|
||||
bug0132.pp segmentation fault with type loop
|
||||
bug0133.pp object type declaration not 100% compatibile with TP7
|
||||
bug0135.pp Unsupported subrange type construction.
|
||||
bug0136.pp No types necessary in the procedure header
|
||||
bug0136.pp No types necessary in the procedure header
|
||||
bug0137.pp Cannot assign child object variable to parent objcet type variable
|
||||
|
Loading…
Reference in New Issue
Block a user