Browse Source

* protected overload test

git-svn-id: trunk@1481 -
peter 20 years ago
parent
commit
c57914be43
3 changed files with 63 additions and 0 deletions
  1. 2 0
      .gitattributes
  2. 29 0
      tests/webtbs/tw4056.pp
  3. 32 0
      tests/webtbs/uw4056.pp

+ 2 - 0
.gitattributes

@@ -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 - 0
tests/webtbs/tw4056.pp

@@ -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 - 0
tests/webtbs/uw4056.pp

@@ -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.