[FIR] Add tests for KT-65184 to confirm its proper work
#KT-65184 Fixed
This commit is contained in:
committed by
Space Team
parent
78b6432ced
commit
8a6467e524
+12
@@ -351,6 +351,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("dnnAsSuperTypeTypeArgument.kt")
|
||||||
|
public void testDnnAsSuperTypeTypeArgument() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/dnnAsSuperTypeTypeArgument.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("Dollar.kt")
|
@TestMetadata("Dollar.kt")
|
||||||
public void testDollar() {
|
public void testDollar() {
|
||||||
@@ -855,6 +861,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt65184.kt")
|
||||||
|
public void testKt65184() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt65184.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() {
|
public void testLValueAssignment() {
|
||||||
|
|||||||
+12
@@ -351,6 +351,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("dnnAsSuperTypeTypeArgument.kt")
|
||||||
|
public void testDnnAsSuperTypeTypeArgument() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/dnnAsSuperTypeTypeArgument.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("Dollar.kt")
|
@TestMetadata("Dollar.kt")
|
||||||
public void testDollar() {
|
public void testDollar() {
|
||||||
@@ -855,6 +861,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt65184.kt")
|
||||||
|
public void testKt65184() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt65184.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() {
|
public void testLValueAssignment() {
|
||||||
|
|||||||
+12
@@ -351,6 +351,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("dnnAsSuperTypeTypeArgument.kt")
|
||||||
|
public void testDnnAsSuperTypeTypeArgument() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/dnnAsSuperTypeTypeArgument.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("Dollar.kt")
|
@TestMetadata("Dollar.kt")
|
||||||
public void testDollar() {
|
public void testDollar() {
|
||||||
@@ -855,6 +861,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt65184.kt")
|
||||||
|
public void testKt65184() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt65184.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() {
|
public void testLValueAssignment() {
|
||||||
|
|||||||
+12
@@ -351,6 +351,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("dnnAsSuperTypeTypeArgument.kt")
|
||||||
|
public void testDnnAsSuperTypeTypeArgument() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/dnnAsSuperTypeTypeArgument.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("Dollar.kt")
|
@TestMetadata("Dollar.kt")
|
||||||
public void testDollar() {
|
public void testDollar() {
|
||||||
@@ -855,6 +861,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt65184.kt")
|
||||||
|
public void testKt65184() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt65184.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() {
|
public void testLValueAssignment() {
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
open class A<TA>
|
||||||
|
|
||||||
|
class B<TB> : A<TB & Any>()
|
||||||
|
|
||||||
|
fun accept(a: A<String>) {}
|
||||||
|
|
||||||
|
fun test() {
|
||||||
|
val b = B<String?>()
|
||||||
|
accept(b)
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
// FULL_JDK
|
||||||
|
|
||||||
|
// FILE: A.java
|
||||||
|
|
||||||
|
public class A<T> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: B.java
|
||||||
|
|
||||||
|
public class B<T> extends A<T> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: box.kt
|
||||||
|
|
||||||
|
import java.util.LinkedList
|
||||||
|
import java.util.Queue
|
||||||
|
|
||||||
|
fun bar(b: A<String>) {}
|
||||||
|
|
||||||
|
fun func(p: A<B<String>>) {
|
||||||
|
}
|
||||||
|
|
||||||
|
class X {
|
||||||
|
fun bar(b: Queue<String>) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(x : X) {
|
||||||
|
x.bar(<!ARGUMENT_TYPE_MISMATCH!>LinkedList<String?>()<!>)
|
||||||
|
bar(<!ARGUMENT_TYPE_MISMATCH!>B<String?>()<!>)
|
||||||
|
func(A<B<String>>())
|
||||||
|
func(<!ARGUMENT_TYPE_MISMATCH!>A<B<String?>>()<!>)
|
||||||
|
func(<!ARGUMENT_TYPE_MISMATCH!>A<B<String?>?>()<!>)
|
||||||
|
func(<!ARGUMENT_TYPE_MISMATCH!>A<B<String>?>()<!>)
|
||||||
|
}
|
||||||
+36
@@ -0,0 +1,36 @@
|
|||||||
|
// FULL_JDK
|
||||||
|
|
||||||
|
// FILE: A.java
|
||||||
|
|
||||||
|
public class A<T> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: B.java
|
||||||
|
|
||||||
|
public class B<T> extends A<T> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// FILE: box.kt
|
||||||
|
|
||||||
|
import java.util.LinkedList
|
||||||
|
import java.util.Queue
|
||||||
|
|
||||||
|
fun bar(b: A<String>) {}
|
||||||
|
|
||||||
|
fun func(p: A<B<String>>) {
|
||||||
|
}
|
||||||
|
|
||||||
|
class X {
|
||||||
|
fun bar(b: Queue<String>) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun test(x : X) {
|
||||||
|
x.bar(<!TYPE_MISMATCH!>LinkedList<String?>()<!>)
|
||||||
|
bar(<!TYPE_MISMATCH!>B<String?>()<!>)
|
||||||
|
func(A<B<String>>())
|
||||||
|
func(<!TYPE_MISMATCH!>A<B<String?>>()<!>)
|
||||||
|
func(<!TYPE_MISMATCH!>A<B<String?>?>()<!>)
|
||||||
|
func(<!TYPE_MISMATCH!>A<B<String>?>()<!>)
|
||||||
|
}
|
||||||
Generated
+12
@@ -351,6 +351,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
runTest("compiler/testData/diagnostics/tests/differentNumericTypesFromSmartCast.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("dnnAsSuperTypeTypeArgument.kt")
|
||||||
|
public void testDnnAsSuperTypeTypeArgument() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/dnnAsSuperTypeTypeArgument.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("Dollar.kt")
|
@TestMetadata("Dollar.kt")
|
||||||
public void testDollar() {
|
public void testDollar() {
|
||||||
@@ -855,6 +861,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
runTest("compiler/testData/diagnostics/tests/kt60638.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("kt65184.kt")
|
||||||
|
public void testKt65184() {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/kt65184.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("LValueAssignment.kt")
|
@TestMetadata("LValueAssignment.kt")
|
||||||
public void testLValueAssignment() {
|
public void testLValueAssignment() {
|
||||||
|
|||||||
Reference in New Issue
Block a user