mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 13:59:29 +02:00
* another test for overloading
This commit is contained in:
parent
faf78ea813
commit
d5db98520a
30
tests/tbs/tb0390.pp
Normal file
30
tests/tbs/tb0390.pp
Normal file
@ -0,0 +1,30 @@
|
||||
{$ifdef fpc}{$mode objfpc}{$endif}
|
||||
type
|
||||
tobj = class
|
||||
procedure proc1 (a: integer);virtual;
|
||||
end;
|
||||
|
||||
tobj1 = class (tobj)
|
||||
procedure proc1 (a: char);overload;
|
||||
end;
|
||||
|
||||
tobj2 = class (tobj1)
|
||||
{ this will try to override tobj1.proc1 which is not
|
||||
allowed and therefor needs an error }
|
||||
procedure proc1 (a: integer);override;
|
||||
end;
|
||||
|
||||
procedure tobj.proc1 (a: integer);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure tobj1.proc1 (a: char);
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure tobj2.proc1 (a: integer);
|
||||
begin
|
||||
end;
|
||||
|
||||
begin
|
||||
end.
|
Loading…
Reference in New Issue
Block a user