diff --git a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeContravariant.kt b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeContravariant.kt index 4f0c88a7dce..6f5ff5f707d 100644 --- a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeContravariant.kt +++ b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeContravariant.kt @@ -1,6 +1,7 @@ // !LANGUAGE: +UnrestrictedBuilderInference // WITH_RUNTIME // DONT_TARGET_EXACT_BACKEND: WASM +// TARGET_BACKEND: JVM // FILE: Test.java diff --git a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt index 59029971c3b..9bb29df7618 100644 --- a/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt +++ b/compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt @@ -2,6 +2,7 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION -EXPERIMENTAL_IS_NOT_ENABLED -UNUSED_VARIABLE // WITH_RUNTIME // DONT_TARGET_EXACT_BACKEND: WASM +// TARGET_BACKEND: JVM // FILE: Test.java diff --git a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt index 221944bd8b3..462efc6f8a6 100644 --- a/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt +++ b/compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt @@ -1,6 +1,7 @@ -// IGNORE_BACKEND_FIR: JVM_IR // !LANGUAGE: +NewInference // WITH_RUNTIME +// TARGET_BACKEND: JVM +// DONT_TARGET_EXACT_BACKEND: WASM import kotlin.experimental.ExperimentalTypeInference diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnType.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnType.kt index 99b8224a551..e5f393a4162 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnType.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnType.kt @@ -36,7 +36,7 @@ fun main(a: ReturnType) { takeNotNullStringAndKNullable(x1) takeNullableStringAndKNullable(x1) takeNotNullStringAndNotNullK(; ReturnType.A!")!>x1) - takeNullableStringAndNotNullK(x1) + takeNullableStringAndNotNullK(x1) takeNotNullString(a.foo41.foo411) val x2 = ..ReturnType.A<@org.jetbrains.annotations.Nullable kotlin.String?, @org.jetbrains.annotations.NotNull R!!>?)")!>a.foo2() @@ -60,6 +60,6 @@ fun main(a: ReturnType) { val x5 = ..kotlin.Array?)")!>a.foo5() takeArrayOfNotNullString(x5) takeArrayOfNullableString(x5) - takeArrayOfNotNullK(x5) + takeArrayOfNotNullK(x5) takeArrayOfNullableK(x5) } diff --git a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.kt b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.kt index 591cb49d247..2710e16342a 100644 --- a/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.kt +++ b/compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/misc/returnTypeWithWarnings.kt @@ -37,26 +37,26 @@ fun main(a: ReturnTypeWithWarnings) { val x1 = ..ReturnTypeWithWarnings.A<(@org.jetbrains.annotations.Nullable kotlin.String..@org.jetbrains.annotations.Nullable kotlin.String?), (@org.jetbrains.annotations.Nullable R..@org.jetbrains.annotations.Nullable R?)>?)")!>a.foo1() takeNotNullStringAndKNullable(; ReturnTypeWithWarnings.A!")!>x1) takeNullableStringAndKNullable(x1) - takeNotNullStringAndNotNullK(; ReturnTypeWithWarnings.A!"), TYPE_MISMATCH("Any; R!"), TYPE_MISMATCH("Any; R!")!>x1) - takeNullableStringAndNotNullK(x1) - takeNotNullString(a.foo41.foo411) + takeNotNullStringAndNotNullK(", "ReturnTypeWithWarnings.A!"), TYPE_MISMATCH("Any", "R!")!>x1) + takeNullableStringAndNotNullK(x1) + takeNotNullString(a.foo41.foo411) val x2 = ..ReturnTypeWithWarnings.A<(@org.jetbrains.annotations.Nullable kotlin.String..@org.jetbrains.annotations.Nullable kotlin.String?), (@org.jetbrains.annotations.NotNull R..@org.jetbrains.annotations.NotNull R?)>?)")!>a.foo2() - takeNotNullStringAndKNullable(; ReturnTypeWithWarnings.A!")!>x2) - takeNullableStringAndKNullable(; ReturnTypeWithWarnings.A!")!>x2) - takeNotNullStringAndNotNullK(; ReturnTypeWithWarnings.A!"), TYPE_MISMATCH("Any; R!"), TYPE_MISMATCH("Any; R!")!>x2) - takeNullableStringAndNotNullK(x2) + takeNotNullStringAndKNullable(", "ReturnTypeWithWarnings.A!")!>x2) + takeNullableStringAndKNullable(", "ReturnTypeWithWarnings.A!")!>x2) + takeNotNullStringAndNotNullK(", "ReturnTypeWithWarnings.A!"), TYPE_MISMATCH("Any", "R!")!>x2) + takeNullableStringAndNotNullK(x2) val x3 = ..ReturnTypeWithWarnings.A<(@org.jetbrains.annotations.NotNull kotlin.String..@org.jetbrains.annotations.NotNull kotlin.String?), (@org.jetbrains.annotations.NotNull R..@org.jetbrains.annotations.NotNull R?)>?)")!>a.foo3 - takeNotNullStringAndKNullable(; ReturnTypeWithWarnings.A!")!>x3) - takeNullableStringAndKNullable(; ReturnTypeWithWarnings.A!")!>x3) - takeNotNullStringAndNotNullK(x3) - takeNullableStringAndNotNullK(; ReturnTypeWithWarnings.A!"), TYPE_MISMATCH("Any; R!"), TYPE_MISMATCH("Any; R!")!>x3) + takeNotNullStringAndKNullable(", "ReturnTypeWithWarnings.A!")!>x3) + takeNullableStringAndKNullable(", "ReturnTypeWithWarnings.A!")!>x3) + takeNotNullStringAndNotNullK(x3) + takeNullableStringAndNotNullK(", "ReturnTypeWithWarnings.A!"), TYPE_MISMATCH("Any", "R!")!>x3) val x4 = ..kotlin.Array)")!>a.foo4 takeArrayOfNotNullString(x4) takeArrayOfNullableString(x4) - takeArrayOfNotNullK(x4) + takeArrayOfNotNullK(x4) takeArrayOfNullableK(; Array<(out) R!!>")!>x4) val x5 = ?..kotlin.Array?)")!>a.foo5() diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.fir.kt index d9ee4434f1d..1ea0075357b 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.fir.kt @@ -72,7 +72,7 @@ fun poll14(flag: Boolean): Flow { fun poll15(flag: Boolean): Flow { return flow { val inv = if (flag) { ::bar5 } else { ::foo5 } - inv() + inv() } } @@ -93,7 +93,7 @@ fun poll17(flag: Boolean): Flow { fun poll4(): Flow { return flow { val inv = try { ::bar } finally { ::foo } - inv() + inv() } } @@ -121,7 +121,7 @@ fun poll43(): Flow { fun poll44(): Flow { return flow { val inv = try { ::bar5 } finally { ::foo5 } - inv() + inv() } } @@ -142,7 +142,7 @@ fun poll46(): Flow { fun poll5(): Flow { return flow { val inv = try { ::bar } catch (e: Exception) { ::foo } finally { ::foo } - inv() + inv() } } @@ -170,7 +170,7 @@ fun poll53(): Flow { fun poll54(): Flow { return flow { val inv = try { ::bar5 } catch (e: Exception) { ::foo5 } finally { ::foo5 } - inv() + inv() } } diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.fir.kt index eed0bcc3bb1..6b6e8aac596 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/specialCallsWithCallableReferencesErrorType.fir.kt @@ -38,7 +38,7 @@ class Flow(private val block: suspend FlowCollector.() -> Unit) fun poll7(): Flow { return flow { val inv = ::bar!! - inv() + inv() } } diff --git a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.fir.kt b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.fir.kt index 0745d9e2455..071bbae9202 100644 --- a/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/builderInference/stubTypes/memberScope.fir.kt @@ -24,7 +24,7 @@ fun test() { get()?.test2() get().test2() get()?.hashCode() - get()?.equals(1) + get()?.equals(1) // there is `String?.equals` extension get().equals("") } @@ -35,10 +35,10 @@ fun test() { get()?.test2() get().test2() get()?.hashCode() - get()?.equals(1) + get()?.equals(1) val x = get() - x?.hashCode() - x?.equals(1) + x?.hashCode() + x?.equals(1) x.equals("") } val ret3 = build { @@ -48,22 +48,22 @@ fun test() { get()?.test2() get().test2() get()?.hashCode() - get()?.equals(1) + get()?.equals(1) val x = get() - x?.hashCode() - x?.equals(1) + x?.hashCode() + x?.equals(1) if (get() == null) {} if (get() === null) {} if (x != null) { - x?.hashCode() - x?.equals(1) + x?.hashCode() + x?.equals(1) x.equals("") x.hashCode() x.toString() x.test() - x?.test2() + x?.test2() x.test2() } @@ -94,7 +94,7 @@ fun test() { emit(null) val x = get() if (x == null) { - x.toString("") + x.toString("") } "" @@ -134,7 +134,7 @@ fun test() { emit(null) val x = get() if (x === null) { - x.toString("") + x.toString("") } "" @@ -164,24 +164,24 @@ fun test() { get()?.test2() get().test2() get()?.hashCode() - get()?.equals(1) + get()?.equals(1) val x = get() - x?.hashCode() - x?.equals(1) + x?.hashCode() + x?.equals(1) if (get() == null) {} if (get() === null) {} if (x == null) { - x?.hashCode() + x?.hashCode() } if (x == null) { - x?.equals(1) + x?.equals(1) } if (x == null) { - x?.test2() + x?.test2() } if (x == null) { @@ -189,15 +189,15 @@ fun test() { } if (x === null) { - x?.hashCode() + x?.hashCode() } if (x === null) { - x?.equals(1) + x?.equals(1) } if (x === null) { - x?.test2() + x?.test2() } if (x === null) { @@ -294,21 +294,21 @@ fun test() { get()?.test2() get().test2() get()?.hashCode() - get()?.equals(1) + get()?.equals(1) val x = get() - x?.hashCode() - x?.equals(1) + x?.hashCode() + x?.equals(1) if (get() == null) {} if (get() === null) {} if (x == null) { - x?.hashCode() - x?.equals(1) - x?.test2() + x?.hashCode() + x?.equals(1) + x?.test2() x.test2() } "" } -} \ No newline at end of file +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.fir.kt index 64eb848ed87..ac991e566ba 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt33542.fir.kt @@ -20,8 +20,8 @@ suspend fun yield() {} fun test() { builder { - send(run { + send(run { yield() // No error but `yield` is not inside "suspension" context actually - }) + }) } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_3.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_3.fir.kt index ebcc831a4f2..5135c5e569a 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_3.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/restrictSuspension/outerYield_1_3.fir.kt @@ -84,10 +84,10 @@ fun test() { with(this) { yield("") - this@with.yield("") + this@with.yield("") yield2("") - this@with.yield2("") + this@with.yield2("") } } } diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 938b853658d..5f448869445 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -14513,6 +14513,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class BuilderInference extends AbstractLightAnalysisModeTest { + @TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt") + public void ignoreSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception { + runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt"); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -14611,11 +14616,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExpression.kt"); } - @TestMetadata("specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt") - public void testSpecialCallsWithCallableReferencesDontCareTypeInBlockExression() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontCareTypeInBlockExression.kt"); - } - @TestMetadata("specialCallsWithCallableReferencesDontRewriteAtSlice.kt") public void testSpecialCallsWithCallableReferencesDontRewriteAtSlice() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesDontRewriteAtSlice.kt"); diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.kt index 9511601d3f2..b2ccba92928 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/try-expression/p-8/neg/1.1.kt @@ -84,9 +84,9 @@ fun case3() { try { throwExceptionA(false) A(2) - } catch (e: ExcA) { + } catch (e: ExcA) { A(null) //diag duplication - } catch (e: ExcB) { + } catch (e: ExcB) { B(null) //diag duplication } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt index 02aea31e5aa..69e5ac775c7 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.1.kt @@ -28,8 +28,8 @@ fun C?.boo( c: ()->C) : String { //(2) this.boo( x )// ok to (1) this.boo( x ) - this.boo( {1}) //to (2); {1} is ()->C - this.boo( {1}) + this.boo( {1}) //to (2); {1} is ()->C + this.boo( {1}) return "" } @@ -49,8 +49,8 @@ fun C?.boo( c: ()->C, x : Int = 1) : String { //(2) this.boo( x )// ok to (1) this.boo( x ) - this.boo( {1}) //to (2); {1} is ()->C - this.boo( {1}) + this.boo( {1}) //to (2); {1} is ()->C + this.boo( {1}) return "" } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt index 7cae8552290..ddc82ee561d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.2.kt @@ -29,8 +29,8 @@ inline operator fun B?.plusAssign( c: ()->Any) { } //(1) @JvmName("aa") inline operator fun B?.plusAssign( c: ()->C) { //(2) - this += {1} - this += {1} + this += {1} + this += {1} } class C \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt index c27545fd57a..514956ac1c0 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.4.kt @@ -28,7 +28,7 @@ fun case1 (){ var b: B? = B() b += { C() } - b += {1} + b += {1} } class B { @@ -65,7 +65,7 @@ fun case2 (){ var b: B = B() b += { C() } - b += {1} + b += {1} } class B { diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt index 614aeaef315..0c8eb1ffd36 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.5.kt @@ -23,7 +23,7 @@ fun case1 (){ var b: B? = null b += { C() } - b += {1} + b += {1} } class B { diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt index 24c9d49aa2f..c954411f57f 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.9.kt @@ -24,7 +24,7 @@ import LibPackCase1.a.plusAssign fun case1 (){ var b: B = B() - b +={ C() } + b +={ C() } b +={ 1 } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt index 6e1b7bb1212..ab5a5b122ba 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/determining-function-applicability-for-a-specific-call/description/p-2/neg/2.1.kt @@ -23,7 +23,7 @@ import LibPackCase1.a.boo import LibPackCase1.b.* fun case1 (b: B?){ - b.boo({ C() }) + b.boo({ C() }) b.boo({1}) } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/71.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/71.kt index f1ac4cfebdb..7d1ee7529ea 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/71.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/71.kt @@ -44,7 +44,7 @@ fun case_1() { fun case_2(): Int { fun b(): Int { var c: Int? = null - if (c == null || 0 < c) c = 0 + if (c == null || 0 < c) c = 0 c return c ?: 0 } diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index d806a5e0644..87334cb35ea 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -12735,16 +12735,6 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt"); } - @TestMetadata("commonSuperTypeContravariant.kt") - public void testCommonSuperTypeContravariant() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/commonSuperTypeContravariant.kt"); - } - - @TestMetadata("commonSuperTypeInvariant.kt") - public void testCommonSuperTypeInvariant() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt"); - } - @TestMetadata("kt41164.kt") public void testKt41164() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt41164.kt"); @@ -12800,11 +12790,6 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt"); } - @TestMetadata("specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt") - public void testSpecialCallsWithCallableReferencesNonStrictOnlyInputTypes() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt"); - } - @TestMetadata("specialCallsWithLambdas.kt") public void testSpecialCallsWithLambdas() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithLambdas.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 0a138e104e6..810b9786e83 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -12141,16 +12141,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt"); } - @TestMetadata("commonSuperTypeContravariant.kt") - public void testCommonSuperTypeContravariant() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/commonSuperTypeContravariant.kt"); - } - - @TestMetadata("commonSuperTypeInvariant.kt") - public void testCommonSuperTypeInvariant() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt"); - } - @TestMetadata("kt41164.kt") public void testKt41164() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt41164.kt"); @@ -12206,11 +12196,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt"); } - @TestMetadata("specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt") - public void testSpecialCallsWithCallableReferencesNonStrictOnlyInputTypes() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt"); - } - @TestMetadata("specialCallsWithLambdas.kt") public void testSpecialCallsWithLambdas() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithLambdas.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index ba1176b0846..05bf8a71d32 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -12206,16 +12206,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inference/builderInference/capturedTypes.kt"); } - @TestMetadata("commonSuperTypeContravariant.kt") - public void testCommonSuperTypeContravariant() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/commonSuperTypeContravariant.kt"); - } - - @TestMetadata("commonSuperTypeInvariant.kt") - public void testCommonSuperTypeInvariant() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/commonSuperTypeInvariant.kt"); - } - @TestMetadata("kt41164.kt") public void testKt41164() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/kt41164.kt"); @@ -12271,11 +12261,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesErrorType.kt"); } - @TestMetadata("specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt") - public void testSpecialCallsWithCallableReferencesNonStrictOnlyInputTypes() throws Exception { - runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithCallableReferencesNonStrictOnlyInputTypes.kt"); - } - @TestMetadata("specialCallsWithLambdas.kt") public void testSpecialCallsWithLambdas() throws Exception { runTest("compiler/testData/codegen/box/inference/builderInference/specialCallsWithLambdas.kt"); diff --git a/nj2k/testData/newJ2k/typeParameters/rawTypeCast.kt b/nj2k/testData/newJ2k/typeParameters/rawTypeCast.kt index a58cc7887d5..0450c2a432c 100644 --- a/nj2k/testData/newJ2k/typeParameters/rawTypeCast.kt +++ b/nj2k/testData/newJ2k/typeParameters/rawTypeCast.kt @@ -1,9 +1,5 @@ // ERROR: Type mismatch: inferred type is Any! but String? was expected // ERROR: Type mismatch: inferred type is (Any?..Any?) but String? was expected -// ERROR: Type mismatch: inferred type is Any! but String? was expected -// ERROR: Type mismatch: inferred type is (Any?..Any?) but String? was expected -// ERROR: Type mismatch: inferred type is Any! but String? was expected -// ERROR: Type mismatch: inferred type is (Any?..Any?) but String? was expected // ERROR: Type mismatch: inferred type is HashMap but Map was expected import java.util.HashMap import java.util.Properties diff --git a/plugins/uast-kotlin/testData/InnerNonFixedTypeVariable.types.txt b/plugins/uast-kotlin/testData/InnerNonFixedTypeVariable.types.txt index 9acbfaee17c..51fead0219e 100644 --- a/plugins/uast-kotlin/testData/InnerNonFixedTypeVariable.types.txt +++ b/plugins/uast-kotlin/testData/InnerNonFixedTypeVariable.types.txt @@ -7,9 +7,9 @@ UFile (package = ) [public final class InnerNonFixedTypeVariableKt {...] UQualifiedReferenceExpression [list.filterIsInstance().(mutableSetOf(), { ...})] : PsiType: UQualifiedReferenceExpression [list.filterIsInstance()] USimpleNameReferenceExpression (identifier = list) [list] : PsiType:List - UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [filterIsInstance()] : PsiType:List + UCallExpression (kind = UastCallKind(name='method_call'), argCount = 0)) [filterIsInstance()] UIdentifier (Identifier (filterIsInstance)) [UIdentifier (Identifier (filterIsInstance))] - USimpleNameReferenceExpression (identifier = filterIsInstance, resolvesTo = null) [filterIsInstance] : PsiType:List + USimpleNameReferenceExpression (identifier = filterIsInstance, resolvesTo = null) [filterIsInstance] UCallExpression (kind = UastCallKind(name='method_call'), argCount = 2)) [(mutableSetOf(), { ...})] : PsiType: UIdentifier (Identifier (mapTo)) [UIdentifier (Identifier (mapTo))] USimpleNameReferenceExpression (identifier = , resolvesTo = null) [] : PsiType: diff --git a/plugins/uast-kotlin/tests/KotlinUastResolveApiTest.kt b/plugins/uast-kotlin/tests/KotlinUastResolveApiTest.kt index fd98568c142..c47f8821433 100644 --- a/plugins/uast-kotlin/tests/KotlinUastResolveApiTest.kt +++ b/plugins/uast-kotlin/tests/KotlinUastResolveApiTest.kt @@ -340,7 +340,7 @@ class KotlinUastResolveApiTest : KotlinLightCodeInsightFixtureTestCase() { val uFile = myFixture.file.toUElement()!! TestCase.assertEquals( - "PsiType:void", + "PsiType:List", uFile.findElementByTextFromPsi("arr[0]").getExpressionType().toString() ) TestCase.assertEquals(