[FIR] Add regression test for overriding Java with DNN without annotations
#KT-58933 Related
This commit is contained in:
committed by
Space Team
parent
ad3da48f55
commit
711e7ce8d7
+6
@@ -27260,6 +27260,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/override/diamondWithDiagonal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dnnOverridesFlexible.kt")
|
||||
public void testDnnOverridesFlexible() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/dnnOverridesFlexible.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DuplicateMethod.kt")
|
||||
public void testDuplicateMethod() throws Exception {
|
||||
|
||||
+6
@@ -27260,6 +27260,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/override/diamondWithDiagonal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dnnOverridesFlexible.kt")
|
||||
public void testDnnOverridesFlexible() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/dnnOverridesFlexible.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DuplicateMethod.kt")
|
||||
public void testDuplicateMethod() throws Exception {
|
||||
|
||||
+6
@@ -25260,6 +25260,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/override/diamondWithDiagonal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dnnOverridesFlexible.kt")
|
||||
public void testDnnOverridesFlexible() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/dnnOverridesFlexible.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DuplicateMethod.kt")
|
||||
public void testDuplicateMethod() throws Exception {
|
||||
|
||||
+6
@@ -25266,6 +25266,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/override/diamondWithDiagonal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dnnOverridesFlexible.kt")
|
||||
public void testDnnOverridesFlexible() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/dnnOverridesFlexible.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DuplicateMethod.kt")
|
||||
public void testDuplicateMethod() throws Exception {
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// ISSUE: KT-58933
|
||||
// FILE: J.java
|
||||
public interface J<T> {
|
||||
void simple(T t);
|
||||
void box(Box<T> box);
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
class Box<T>
|
||||
|
||||
class K<T> : J<T> {
|
||||
override fun simple(t: T & Any) {}
|
||||
override fun box(box: Box<T & Any>) {}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// ISSUE: KT-58933
|
||||
// FILE: J.java
|
||||
public interface J<T> {
|
||||
void simple(T t);
|
||||
void box(Box<T> box);
|
||||
}
|
||||
|
||||
// FILE: test.kt
|
||||
class Box<T>
|
||||
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class K<!><T> : J<T> {
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun simple(t: T & Any) {}
|
||||
<!NOTHING_TO_OVERRIDE!>override<!> fun box(box: Box<T & Any>) {}
|
||||
}
|
||||
Generated
+6
@@ -27260,6 +27260,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/override/diamondWithDiagonal.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("dnnOverridesFlexible.kt")
|
||||
public void testDnnOverridesFlexible() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/dnnOverridesFlexible.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("DuplicateMethod.kt")
|
||||
public void testDuplicateMethod() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user