[FE 1.0] Add test for KT-50850
This commit is contained in:
committed by
TeamCityServer
parent
56e5db9f0e
commit
239a330ddd
+12
@@ -17762,6 +17762,18 @@ public class DiagnosisCompilerTestFE10TestdataTestGenerated extends AbstractDiag
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/nullForOptionalOrElse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("orderOfSupertypesAndFakeOverrides_1.kt")
|
||||
public void testOrderOfSupertypesAndFakeOverrides_1() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/orderOfSupertypesAndFakeOverrides_1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("orderOfSupertypesAndFakeOverrides_2.kt")
|
||||
public void testOrderOfSupertypesAndFakeOverrides_2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/orderOfSupertypesAndFakeOverrides_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideRawType.kt")
|
||||
public void testOverrideRawType() throws Exception {
|
||||
|
||||
+12
@@ -17762,6 +17762,18 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/nullForOptionalOrElse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("orderOfSupertypesAndFakeOverrides_1.kt")
|
||||
public void testOrderOfSupertypesAndFakeOverrides_1() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/orderOfSupertypesAndFakeOverrides_1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("orderOfSupertypesAndFakeOverrides_2.kt")
|
||||
public void testOrderOfSupertypesAndFakeOverrides_2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/orderOfSupertypesAndFakeOverrides_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideRawType.kt")
|
||||
public void testOverrideRawType() throws Exception {
|
||||
|
||||
+12
@@ -17762,6 +17762,18 @@ public class FirOldFrontendDiagnosticsWithLightTreeTestGenerated extends Abstrac
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/nullForOptionalOrElse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("orderOfSupertypesAndFakeOverrides_1.kt")
|
||||
public void testOrderOfSupertypesAndFakeOverrides_1() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/orderOfSupertypesAndFakeOverrides_1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("orderOfSupertypesAndFakeOverrides_2.kt")
|
||||
public void testOrderOfSupertypesAndFakeOverrides_2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/orderOfSupertypesAndFakeOverrides_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideRawType.kt")
|
||||
public void testOverrideRawType() throws Exception {
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// ISSUE: KT-50850
|
||||
// FILE: Base.java
|
||||
public interface Base {
|
||||
void delete(String s);
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
abstract class Derived : Base {
|
||||
override fun delete(s: String) {}
|
||||
}
|
||||
|
||||
class InterfaceThenClass : Base, Derived() {}
|
||||
|
||||
fun test_1(x: InterfaceThenClass, s: String?) {
|
||||
x.delete(<!ARGUMENT_TYPE_MISMATCH!>s<!>)
|
||||
}
|
||||
|
||||
class ClassThenInterface : Derived(), Base {}
|
||||
|
||||
fun test_2(x: ClassThenInterface, s: String?) {
|
||||
x.delete(<!ARGUMENT_TYPE_MISMATCH!>s<!>)
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// ISSUE: KT-50850
|
||||
// FILE: Base.java
|
||||
public interface Base {
|
||||
void delete(String s);
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
abstract class Derived : Base {
|
||||
override fun delete(s: String) {}
|
||||
}
|
||||
|
||||
class InterfaceThenClass : Base, Derived() {}
|
||||
|
||||
fun test_1(x: InterfaceThenClass, s: String?) {
|
||||
x.delete(s)
|
||||
}
|
||||
|
||||
class ClassThenInterface : Derived(), Base {}
|
||||
|
||||
fun test_2(x: ClassThenInterface, s: String?) {
|
||||
x.delete(<!TYPE_MISMATCH!>s<!>)
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package
|
||||
|
||||
public fun test_1(/*0*/ x: InterfaceThenClass, /*1*/ s: kotlin.String?): kotlin.Unit
|
||||
public fun test_2(/*0*/ x: ClassThenInterface, /*1*/ s: kotlin.String?): kotlin.Unit
|
||||
|
||||
public interface Base {
|
||||
public abstract fun delete(/*0*/ s: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class ClassThenInterface : Derived, Base {
|
||||
public constructor ClassThenInterface()
|
||||
public open override /*2*/ /*fake_override*/ fun delete(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class Derived : Base {
|
||||
public constructor Derived()
|
||||
public open override /*1*/ fun delete(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class InterfaceThenClass : Base, Derived {
|
||||
public constructor InterfaceThenClass()
|
||||
public open override /*2*/ /*fake_override*/ fun delete(/*0*/ s: kotlin.String!): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// ISSUE: KT-50850
|
||||
// FILE: JavaBase.java
|
||||
public interface JavaBase {
|
||||
void delete(String s);
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
abstract class KotlinBase {
|
||||
open fun delete(s: String) {}
|
||||
}
|
||||
|
||||
class InterfaceThenClass : JavaBase, KotlinBase() {}
|
||||
class ClassThenInterface : KotlinBase(), JavaBase {}
|
||||
|
||||
fun test_1(x: InterfaceThenClass, s: String?) {
|
||||
x.delete(s)
|
||||
}
|
||||
|
||||
fun test_2(x: ClassThenInterface, s: String?) {
|
||||
x.delete(<!ARGUMENT_TYPE_MISMATCH!>s<!>)
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
// ISSUE: KT-50850
|
||||
// FILE: JavaBase.java
|
||||
public interface JavaBase {
|
||||
void delete(String s);
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
abstract class KotlinBase {
|
||||
open fun delete(s: String) {}
|
||||
}
|
||||
|
||||
class InterfaceThenClass : JavaBase, KotlinBase() {}
|
||||
class ClassThenInterface : KotlinBase(), JavaBase {}
|
||||
|
||||
fun test_1(x: InterfaceThenClass, s: String?) {
|
||||
x.delete(s)
|
||||
}
|
||||
|
||||
fun test_2(x: ClassThenInterface, s: String?) {
|
||||
x.delete(<!TYPE_MISMATCH!>s<!>)
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package
|
||||
|
||||
public fun test_1(/*0*/ x: InterfaceThenClass, /*1*/ s: kotlin.String?): kotlin.Unit
|
||||
public fun test_2(/*0*/ x: ClassThenInterface, /*1*/ s: kotlin.String?): kotlin.Unit
|
||||
|
||||
public final class ClassThenInterface : KotlinBase, JavaBase {
|
||||
public constructor ClassThenInterface()
|
||||
public open override /*2*/ /*fake_override*/ fun delete(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class InterfaceThenClass : JavaBase, KotlinBase {
|
||||
public constructor InterfaceThenClass()
|
||||
public open override /*2*/ /*fake_override*/ fun delete(/*0*/ s: kotlin.String!): kotlin.Unit
|
||||
public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*2*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface JavaBase {
|
||||
public abstract fun delete(/*0*/ s: kotlin.String!): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class KotlinBase {
|
||||
public constructor KotlinBase()
|
||||
public open fun delete(/*0*/ s: kotlin.String): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
Generated
+12
@@ -17768,6 +17768,18 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/nullForOptionalOrElse.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("orderOfSupertypesAndFakeOverrides_1.kt")
|
||||
public void testOrderOfSupertypesAndFakeOverrides_1() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/orderOfSupertypesAndFakeOverrides_1.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("orderOfSupertypesAndFakeOverrides_2.kt")
|
||||
public void testOrderOfSupertypesAndFakeOverrides_2() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/orderOfSupertypesAndFakeOverrides_2.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("overrideRawType.kt")
|
||||
public void testOverrideRawType() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user