summaryrefslogtreecommitdiff
path: root/tests/webtbf/tw11862a.pp
diff options
context:
space:
mode:
authorjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-08-16 20:08:25 +0000
committerjonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2>2008-08-16 20:08:25 +0000
commit907a727ae7facf586333644005b9ad0a4dbbd861 (patch)
tree2edfe88e441a24cc52ea34e7683ae9ba182448ea /tests/webtbf/tw11862a.pp
parent039811c2cd621e90656c78e77a0ee9a6a7081ca3 (diff)
downloadfpc-907a727ae7facf586333644005b9ad0a4dbbd861.tar.gz
* method definitions in "child" interfaces also hide those in "parent"
interfaces, even if they only differ in resulttype (mantis #11862) * fixing this required that multiple entries for the same method in a interface vmt are all written out (change in ImplementedInterface.AddImplProc) git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@11595 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'tests/webtbf/tw11862a.pp')
-rw-r--r--tests/webtbf/tw11862a.pp57
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/webtbf/tw11862a.pp b/tests/webtbf/tw11862a.pp
new file mode 100644
index 0000000000..e2b79961e8
--- /dev/null
+++ b/tests/webtbf/tw11862a.pp
@@ -0,0 +1,57 @@
+{ %fail }
+
+program bug9;
+
+{$ifdef fpc}
+{$mode delphi}
+{$endif}
+
+
+type
+ ITest = interface(IInterface)
+ ['{FE6B16A6-A898-4B09-A46E-0AAC5E0A4E14}']
+ function Parent: ITest;
+ function GetChild: ITest;
+ end;
+
+ ITestEx = interface(ITest)
+ ['{82449E91-76BE-4F4A-B873-1865042D5CAF}']
+ end;
+
+ TTest = class(TInterfacedObject, ITest)
+ function ITest.Parent = ParentEx;
+ { ITestEx }
+ function ParentEx: ITestEx;
+ function GetChild: ITest;
+ procedure RemoveChild;
+ end;
+ { ITest }
+
+ { ITestEx }
+
+function TTest.ParentEx: ITest;
+begin;
+Result := nil
+end;
+
+
+
+function TTest.GetChild: ITest;
+begin;
+WriteLn('TTest.GetChild');
+Result := nil
+end;
+
+procedure TTest.RemoveChild;
+begin;
+WriteLn('TTest.RemoveChild');
+end;
+
+
+var E: ITest;
+begin
+ E := TTest.Create;
+ WriteLn('Calling GetChild');
+ E.GetChild();
+ WriteLn('Stop');
+end.