mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 10:48:12 +02:00
* protected overload test
git-svn-id: trunk@1481 -
This commit is contained in:
parent
7be36096f0
commit
c57914be43
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -6282,6 +6282,7 @@ tests/webtbs/tw4015.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4038.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4043.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4055.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4056.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4058.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4068.pp svneol=native#text/plain
|
||||
tests/webtbs/tw4078.pp svneol=native#text/plain
|
||||
@ -6364,6 +6365,7 @@ tests/webtbs/uw3429.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3474a.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3474b.pp svneol=native#text/plain
|
||||
tests/webtbs/uw3968.pp svneol=native#text/plain
|
||||
tests/webtbs/uw4056.pp svneol=native#text/plain
|
||||
tests/webtbs/uw4140.pp svneol=native#text/plain
|
||||
tests/webtbs/uw4352a.pp svneol=native#text/plain
|
||||
tests/webtbs/uw4352b.pp svneol=native#text/plain
|
||||
|
29
tests/webtbs/tw4056.pp
Normal file
29
tests/webtbs/tw4056.pp
Normal file
@ -0,0 +1,29 @@
|
||||
{$ifdef fpc}{$Mode delphi}{$endif}
|
||||
uses
|
||||
uw4056;
|
||||
|
||||
type
|
||||
TestC = class(TestB)
|
||||
public
|
||||
procedure TestProc; override;
|
||||
procedure TestProc(const C: Integer); override;
|
||||
end;
|
||||
|
||||
var
|
||||
X : TestC;
|
||||
|
||||
procedure TestC.TestProc;
|
||||
begin
|
||||
inherited TestProc;
|
||||
end;
|
||||
|
||||
procedure TestC.TestProc(const C: Integer);
|
||||
begin
|
||||
inherited TestProc(C);
|
||||
end;
|
||||
|
||||
begin
|
||||
X := TestC.Create;
|
||||
X.TestProc(10);
|
||||
X.Free;
|
||||
end.
|
32
tests/webtbs/uw4056.pp
Normal file
32
tests/webtbs/uw4056.pp
Normal file
@ -0,0 +1,32 @@
|
||||
{$ifdef fpc}{$Mode delphi}{$endif}
|
||||
unit uw4056;
|
||||
|
||||
interface
|
||||
|
||||
type
|
||||
TestA = class
|
||||
protected
|
||||
procedure TestProc; overload; virtual;
|
||||
procedure TestProc(const C: Integer); overload; virtual;
|
||||
end;
|
||||
TestB = class(TestA)
|
||||
public
|
||||
procedure TestProc; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
procedure TestA.TestProc;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure TestA.TestProc(const C: Integer);
|
||||
begin
|
||||
writeln(C);
|
||||
end;
|
||||
|
||||
procedure TestB.TestProc;
|
||||
begin
|
||||
end;
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user