[Tests] Add regression test for #KT-66158
This commit is contained in:
committed by
Space Team
parent
5bca945d05
commit
bb6091cc90
+6
@@ -22294,6 +22294,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kjkRawTypeWithKotlinUpperBound.kt")
|
||||||
|
public void testKjkRawTypeWithKotlinUpperBound() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkRawTypeWithKotlinUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt1402.kt")
|
@TestMetadata("kt1402.kt")
|
||||||
public void testKt1402() {
|
public void testKt1402() {
|
||||||
|
|||||||
+6
@@ -22294,6 +22294,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kjkRawTypeWithKotlinUpperBound.kt")
|
||||||
|
public void testKjkRawTypeWithKotlinUpperBound() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkRawTypeWithKotlinUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt1402.kt")
|
@TestMetadata("kt1402.kt")
|
||||||
public void testKt1402() {
|
public void testKt1402() {
|
||||||
|
|||||||
+6
@@ -22288,6 +22288,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kjkRawTypeWithKotlinUpperBound.kt")
|
||||||
|
public void testKjkRawTypeWithKotlinUpperBound() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkRawTypeWithKotlinUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt1402.kt")
|
@TestMetadata("kt1402.kt")
|
||||||
public void testKt1402() {
|
public void testKt1402() {
|
||||||
|
|||||||
+6
@@ -22294,6 +22294,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kjkRawTypeWithKotlinUpperBound.kt")
|
||||||
|
public void testKjkRawTypeWithKotlinUpperBound() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkRawTypeWithKotlinUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt1402.kt")
|
@TestMetadata("kt1402.kt")
|
||||||
public void testKt1402() {
|
public void testKt1402() {
|
||||||
|
|||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
// ISSUE: KT-66158
|
||||||
|
// FILE: Java1.java
|
||||||
|
public class Java1 extends KotlinClass { }
|
||||||
|
|
||||||
|
// FILE: 1.kt
|
||||||
|
open class KotlinClass<T : Number> {
|
||||||
|
open fun bar(): T? {
|
||||||
|
return null!!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class A : Java1()
|
||||||
|
|
||||||
|
fun test(a: A) {
|
||||||
|
val k: Number = <!INITIALIZER_TYPE_MISMATCH, TYPE_MISMATCH!>a.bar()<!>
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
// ISSUE: KT-66158
|
||||||
|
// FILE: Java1.java
|
||||||
|
public class Java1 extends KotlinClass { }
|
||||||
|
|
||||||
|
// FILE: 1.kt
|
||||||
|
open class KotlinClass<T : Number> {
|
||||||
|
open fun bar(): T? {
|
||||||
|
return null!!
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class A : Java1()
|
||||||
|
|
||||||
|
fun test(a: A) {
|
||||||
|
val k: Number = <!TYPE_MISMATCH!>a.bar()<!>
|
||||||
|
}
|
||||||
Generated
+6
@@ -22294,6 +22294,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkPropertyAndExtensionProperty.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kjkRawTypeWithKotlinUpperBound.kt")
|
||||||
|
public void testKjkRawTypeWithKotlinUpperBound() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/j+k/kjkRawTypeWithKotlinUpperBound.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("kt1402.kt")
|
@TestMetadata("kt1402.kt")
|
||||||
public void testKt1402() {
|
public void testKt1402() {
|
||||||
|
|||||||
Reference in New Issue
Block a user