diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt index b3e430d19b8..6c8123287db 100644 --- a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt +++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt @@ -30,7 +30,7 @@ fun test(x: T) { baz(null, null, ::foo) val s3: Pair = bar(null, null, ::foo) - val s4: Pair = bar(null, null, ::foo) + val s4: Pair = bar(null, null, ::foo) val s5: Pair = bar(1, "", ::foo) val (a1: Int, b1: String) = bar(1, "", ::foo) diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.fir.kt index 2e9264619c7..a41b87bd9e3 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.fir.kt @@ -1,4 +1,5 @@ // !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST +// !WITH_NEW_INFERENCE fun bar(x: Int) = x + 1 fun foo() { diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.kt index a2a2b5f470d..5192ef84474 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/DeepIf.kt @@ -1,4 +1,5 @@ // !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST +// !WITH_NEW_INFERENCE fun bar(x: Int) = x + 1 fun foo() { @@ -12,17 +13,17 @@ fun foo() { if (1 > 2) bar(x) } if (x == null) { - bar(x) + bar(x) } - if (x == null) bar(x) else bar(x) + if (x == null) bar(x) else bar(x) bar(bar(x)) } else if (x == null) { bar(x) if (x != null) { - bar(x) - if (x == null) bar(x) - if (x == null) bar(x) else bar(x) - bar(bar(x) + bar(x)) + bar(x) + if (x == null) bar(x) + if (x == null) bar(x) else bar(x) + bar(bar(x) + bar(x)) } else if (x == null) { bar(x) } diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.fir.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.fir.kt index 28b3d130b89..3a0a0916cfd 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.fir.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.fir.kt @@ -1,3 +1,4 @@ +// !WITH_NEW_INFERENCE fun bar(x: Int): Int = x + 1 fun foo() { diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt index 0589735a2ef..c90ae2af731 100644 --- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt +++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/For.kt @@ -1,3 +1,4 @@ +// !WITH_NEW_INFERENCE fun bar(x: Int): Int = x + 1 fun foo() { @@ -10,7 +11,7 @@ fun foo() { bar(x) for (q in a) { bar(x) - if (x == null) bar(x) + if (x == null) bar(x) } } diff --git a/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.fir.kt b/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.fir.kt index 58e4ad63617..80392808388 100644 --- a/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.fir.kt +++ b/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.fir.kt @@ -1,5 +1,8 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE // !WITH_NEW_INFERENCE fun nullable(): T? = null -val value = nullable() ?: nullable() \ No newline at end of file +fun test() { + val value = nullable() ?: nullable() +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.kt b/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.kt index 9ac95c8770a..ab85e52ed9a 100644 --- a/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.kt +++ b/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.kt @@ -1,5 +1,8 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE // !WITH_NEW_INFERENCE fun nullable(): T? = null -val value = nullable() ?: nullable() \ No newline at end of file +fun test() { + val value = nullable() ?: nullable() +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.txt b/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.txt index f0e764ecab4..a8219cad8f0 100644 --- a/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.txt +++ b/compiler/testData/diagnostics/tests/inference/commonSystem/kt32818.txt @@ -1,4 +1,4 @@ package -public val value: kotlin.Int public fun nullable(): T? +public fun test(): kotlin.Unit diff --git a/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.fir.kt b/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.fir.kt index bad2af8e986..f69ba67ed63 100644 --- a/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.fir.kt +++ b/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.fir.kt @@ -1,5 +1,6 @@ // !LANGUAGE: -AllowAssigningArrayElementsToVarargsInNamedFormForFunctions // !DIAGNOSTICS: -UNUSED_PARAMETER +// !WITH_NEW_INFERENCE @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.EXPRESSION) diff --git a/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.kt b/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.kt index deac2b29081..482d6abbb36 100644 --- a/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.kt +++ b/compiler/testData/diagnostics/tests/varargs/assignArrayToVararagInNamedForm_1_3.kt @@ -1,5 +1,6 @@ // !LANGUAGE: -AllowAssigningArrayElementsToVarargsInNamedFormForFunctions // !DIAGNOSTICS: -UNUSED_PARAMETER +// !WITH_NEW_INFERENCE @Retention(AnnotationRetention.SOURCE) @Target(AnnotationTarget.EXPRESSION) @@ -19,7 +20,7 @@ fun test_fun(s: String, arr: Array) { } fun test_ann(s: String, arr: Array) { - @Ann([""], x = 1) + @Ann([""], x = 1) foo() @Ann(*[""], x = 1) foo() diff --git a/compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.fir.kt index 5965caa70c1..aceb78c572e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.fir.kt @@ -1,5 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNCHECKED_CAST -USELESS_CAST // !LANGUAGE: +ProhibitNonReifiedArraysAsReifiedTypeArguments +// !WITH_NEW_INFERENCE class A fun test1( diff --git a/compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt b/compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt index 24fe9880e02..ecd73a325b1 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/ArrayOfNothing.kt @@ -1,5 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE -UNCHECKED_CAST -USELESS_CAST // !LANGUAGE: +ProhibitNonReifiedArraysAsReifiedTypeArguments +// !WITH_NEW_INFERENCE class A fun test1( @@ -50,6 +51,6 @@ fun test6() = foo() class B(val array: Array) -fun bar() = B>(arrayOf()) +fun bar() = B>(arrayOf()) fun test7() = bar() diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionWithNonValuableConstraints.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionWithNonValuableConstraints.kt index 4ff8e63652c..7aafbff5bdd 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionWithNonValuableConstraints.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/extensionWithNonValuableConstraints.kt @@ -53,7 +53,7 @@ val test6 = generate { } val test7 = generate { - yield("baz") + yield("baz") genericExtension() } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt index 218fb33e0e4..ba3299f2b20 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.kt @@ -1,4 +1,4 @@ // !WITH_NEW_INFERENCE // NI_EXPECTED_FILE -fun foo(first: Array, second: Array) = Pair(first.toCollection(), second.toCollection()) \ No newline at end of file +fun foo(first: Array, second: Array) = Pair(first.toCollection(), second.toCollection()) \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.ni.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.ni.txt index e1f0a5b5c7b..71d97fe0ee3 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.ni.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt11266.ni.txt @@ -1,3 +1,3 @@ package -public fun foo(/*0*/ first: kotlin.Array, /*1*/ second: kotlin.Array): [ERROR : Error function type] +public fun foo(/*0*/ first: kotlin.Array, /*1*/ second: kotlin.Array): kotlin.Pair, kotlin.collections.MutableCollection> diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt index 6d37ea85e0a..281ea18b652 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithGenericsWithoutRefinedSams.kt @@ -22,5 +22,5 @@ class Foo { // FILE: 1.kt fun test() { Foo().foo {} checkType { _() } - Foo().bar {} checkType { _() } + Foo().bar {} checkType { _() } } \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt index 3e756fcdd78..544a5019925 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/resolve/samOverloadsWithKtFunctionWithoutRefinedSams.kt @@ -18,5 +18,5 @@ public class Foo { // FILE: 1.kt fun bar() { - Foo().test {} checkType { _() } + Foo().test {} checkType { _() } } \ No newline at end of file