FE: add tests to reproduce KT-56720

This commit is contained in:
Mikhail Glukhikh
2023-02-16 13:20:17 +01:00
committed by Space Team
parent 4981a52904
commit ab883d91c8
8 changed files with 112 additions and 0 deletions
@@ -23952,6 +23952,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
runTest("compiler/testData/diagnostics/tests/override/kt8990.kt");
}
@Test
@TestMetadata("manyImplFromOneJavaInterfaceWithDelegation.kt")
public void testManyImplFromOneJavaInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/diagnostics/tests/override/manyImplFromOneJavaInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("manyImplFromOneKotlinInterfaceWithDelegation.kt")
public void testManyImplFromOneKotlinInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/diagnostics/tests/override/manyImplFromOneKotlinInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("MissingDelegate.kt")
public void testMissingDelegate() throws Exception {
@@ -23952,6 +23952,18 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/override/kt8990.kt");
}
@Test
@TestMetadata("manyImplFromOneJavaInterfaceWithDelegation.kt")
public void testManyImplFromOneJavaInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/diagnostics/tests/override/manyImplFromOneJavaInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("manyImplFromOneKotlinInterfaceWithDelegation.kt")
public void testManyImplFromOneKotlinInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/diagnostics/tests/override/manyImplFromOneKotlinInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("MissingDelegate.kt")
public void testMissingDelegate() throws Exception {
@@ -23958,6 +23958,18 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/override/kt8990.kt");
}
@Test
@TestMetadata("manyImplFromOneJavaInterfaceWithDelegation.kt")
public void testManyImplFromOneJavaInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/diagnostics/tests/override/manyImplFromOneJavaInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("manyImplFromOneKotlinInterfaceWithDelegation.kt")
public void testManyImplFromOneKotlinInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/diagnostics/tests/override/manyImplFromOneKotlinInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("MissingDelegate.kt")
public void testMissingDelegate() throws Exception {
@@ -0,0 +1,19 @@
// FILE: A.java
public interface A {
default void foo() {}
}
// FILE: B.java
public interface B extends A
// FILE: C.java
public interface C extends A
// FILE: test.kt
class Adapter : B, C
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>class D<!>(val adapter: Adapter) : B by adapter, C by adapter
@@ -0,0 +1,19 @@
// FILE: A.java
public interface A {
default void foo() {}
}
// FILE: B.java
public interface B extends A
// FILE: C.java
public interface C extends A
// FILE: test.kt
class Adapter : B, C
class D(val adapter: Adapter) : B by adapter, C by adapter
@@ -0,0 +1,20 @@
// FIR_IDENTICAL
// FILE: A.kt
interface A {
fun foo() {}
}
// FILE: B.kt
interface B : A
// FILE: C.kt
interface C : A
// FILE: test.kt
class Adapter : B, C
<!MANY_IMPL_MEMBER_NOT_IMPLEMENTED!>class D<!>(val adapter: Adapter) : B by adapter, C by adapter
@@ -23958,6 +23958,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/override/kt8990.kt");
}
@Test
@TestMetadata("manyImplFromOneJavaInterfaceWithDelegation.kt")
public void testManyImplFromOneJavaInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/diagnostics/tests/override/manyImplFromOneJavaInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("manyImplFromOneKotlinInterfaceWithDelegation.kt")
public void testManyImplFromOneKotlinInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/diagnostics/tests/override/manyImplFromOneKotlinInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("MissingDelegate.kt")
public void testMissingDelegate() throws Exception {
@@ -18445,6 +18445,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/fir/LookupTags.kt");
}
@Test
@TestMetadata("manyImplFromOneJavaInterfaceWithDelegation.kt")
public void testManyImplFromOneJavaInterfaceWithDelegation() throws Exception {
runTest("compiler/testData/codegen/box/fir/manyImplFromOneJavaInterfaceWithDelegation.kt");
}
@Test
@TestMetadata("NameHighlighter.kt")
public void testNameHighlighter() throws Exception {