KT-55822: Add diagnostics test showing that issue is fixed in K2
^KT-55822: Fixed Target versions: K2
This commit is contained in:
committed by
Space Team
parent
16f14a21e2
commit
5cb31c4874
+6
@@ -23436,6 +23436,12 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/override/Generics.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InheritingJavaClassWithRawTypeInOverrideSignature.kt")
|
||||
public void testInheritingJavaClassWithRawTypeInOverrideSignature() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/InheritingJavaClassWithRawTypeInOverrideSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InternalPotentialOverride.kt")
|
||||
public void testInternalPotentialOverride() throws Exception {
|
||||
|
||||
+6
@@ -23442,6 +23442,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/override/Generics.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InheritingJavaClassWithRawTypeInOverrideSignature.kt")
|
||||
public void testInheritingJavaClassWithRawTypeInOverrideSignature() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/InheritingJavaClassWithRawTypeInOverrideSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InternalPotentialOverride.kt")
|
||||
public void testInternalPotentialOverride() throws Exception {
|
||||
|
||||
+6
@@ -23436,6 +23436,12 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/override/Generics.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InheritingJavaClassWithRawTypeInOverrideSignature.kt")
|
||||
public void testInheritingJavaClassWithRawTypeInOverrideSignature() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/InheritingJavaClassWithRawTypeInOverrideSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InternalPotentialOverride.kt")
|
||||
public void testInternalPotentialOverride() throws Exception {
|
||||
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: A.java
|
||||
import java.util.List;
|
||||
|
||||
public interface A<T> {
|
||||
void foo(List<T> list);
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import java.util.List;
|
||||
|
||||
public abstract class B implements A<String> {
|
||||
@Override
|
||||
public final void foo(List list) {}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
public class C extends B implements A<String> {}
|
||||
|
||||
// FILE: Main.kt
|
||||
class X : C() // false positive in K1, OK in K2
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// FILE: A.java
|
||||
import java.util.List;
|
||||
|
||||
public interface A<T> {
|
||||
void foo(List<T> list);
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
import java.util.List;
|
||||
|
||||
public abstract class B implements A<String> {
|
||||
@Override
|
||||
public final void foo(List list) {}
|
||||
}
|
||||
|
||||
// FILE: C.java
|
||||
public class C extends B implements A<String> {}
|
||||
|
||||
// FILE: Main.kt
|
||||
<!ABSTRACT_CLASS_MEMBER_NOT_IMPLEMENTED!>class <!CONFLICTING_INHERITED_JVM_DECLARATIONS!>X<!><!> : C() // false positive in K1, OK in K2
|
||||
Vendored
+34
@@ -0,0 +1,34 @@
|
||||
package
|
||||
|
||||
public interface A</*0*/ T : kotlin.Any!> {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public abstract fun foo(/*0*/ list: kotlin.collections.(Mutable)List<T!>!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class B : A<kotlin.String!> {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@java.lang.Override public final override /*1*/ fun foo(/*0*/ list: kotlin.collections.(Mutable)List<(raw) kotlin.Any?>!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class C : B, A<kotlin.String!> {
|
||||
public constructor C()
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@java.lang.Override public final override /*1*/ /*fake_override*/ fun foo(/*0*/ list: kotlin.collections.(Mutable)List<(raw) kotlin.Any?>!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ list: kotlin.collections.(Mutable)List<kotlin.String!>!): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class X : C {
|
||||
public constructor X()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
@java.lang.Override public final override /*1*/ /*fake_override*/ fun foo(/*0*/ list: kotlin.collections.(Mutable)List<(raw) kotlin.Any?>!): kotlin.Unit
|
||||
public abstract override /*1*/ /*fake_override*/ fun foo(/*0*/ list: kotlin.collections.(Mutable)List<kotlin.String!>!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Generated
+6
@@ -23442,6 +23442,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/override/Generics.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InheritingJavaClassWithRawTypeInOverrideSignature.kt")
|
||||
public void testInheritingJavaClassWithRawTypeInOverrideSignature() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/override/InheritingJavaClassWithRawTypeInOverrideSignature.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("InternalPotentialOverride.kt")
|
||||
public void testInternalPotentialOverride() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user