diff --git a/compiler/testData/diagnostics/tests/Delegation_Hierarchy.kt b/compiler/testData/diagnostics/tests/Delegation_Hierarchy.kt new file mode 100644 index 00000000000..46fc4d424f8 --- /dev/null +++ b/compiler/testData/diagnostics/tests/Delegation_Hierarchy.kt @@ -0,0 +1,12 @@ +trait A { + fun foo() {} +} + +open class B(a: A) : A by a + +class C(a: A): B(a), A { +} + +fun b(c: C) { + c.foo(); +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index 2781988d9a7..bbf4f11c4e9 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -185,7 +185,17 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage public void testDelegationNotTotrait() throws Exception { doTest("compiler/testData/diagnostics/tests/DelegationNotTotrait.kt"); } - + + @TestMetadata("Delegation_MultipleDelegates.kt") + public void testMultipleDelegation() throws Exception { + doTest("compiler/testData/diagnostics/tests/Delegation_MultipleDelegates.kt"); + } + + @TestMetadata("Delegation_Hierarchy.kt") + public void testHierarchyDelegation() throws Exception { + doTest("compiler/testData/diagnostics/tests/Delegation_Hierarchy.kt"); + } + @TestMetadata("DelegationToJavaIface.kt") public void testDelegationToJavaIface() throws Exception { doTest("compiler/testData/diagnostics/tests/DelegationToJavaIface.kt");