diff --git a/compiler/testData/diagnostics/tests/AutoCreatedIt.kt b/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
index de250dc57c8..b08fa55122f 100644
--- a/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
+++ b/compiler/testData/diagnostics/tests/AutoCreatedIt.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun text() {
"direct:a" to "mock:a"
"direct:a" on {it.body == ""} to "mock:a"
diff --git a/compiler/testData/diagnostics/tests/Basic.kt b/compiler/testData/diagnostics/tests/Basic.kt
index c005cd17aaa..97cab674d1a 100644
--- a/compiler/testData/diagnostics/tests/Basic.kt
+++ b/compiler/testData/diagnostics/tests/Basic.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(u : Unit) : Int = 1
fun test() : Int {
diff --git a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
index d95e000f29f..f52b511ab4c 100644
--- a/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
+++ b/compiler/testData/diagnostics/tests/BinaryCallsOnNullableValues.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A() {
override fun equals(other : Any?) : Boolean = false
}
diff --git a/compiler/testData/diagnostics/tests/Bounds.kt b/compiler/testData/diagnostics/tests/Bounds.kt
index 2efca46f280..d91a22dc5c3 100644
--- a/compiler/testData/diagnostics/tests/Bounds.kt
+++ b/compiler/testData/diagnostics/tests/Bounds.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: a.kt
package boundsWithSubstitutors
open class A
diff --git a/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt b/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
index acf006ac7ac..fffe1dd919d 100644
--- a/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
+++ b/compiler/testData/diagnostics/tests/CompareToWithErrorType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test() {
if (x > 0) {
diff --git a/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt b/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
index 2ab8a0dbbbf..1d53a3591c7 100644
--- a/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
+++ b/compiler/testData/diagnostics/tests/DefaultValuesTypechecking.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val x = ""
fun bar(x : Int = "", y : Int = x, z : String = y) {
diff --git a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt
index 6d714fe9908..c39ee97049a 100644
--- a/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt
+++ b/compiler/testData/diagnostics/tests/DeprecatedUnaryOperatorConventions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Example {
diff --git a/compiler/testData/diagnostics/tests/EnumEntryAsType.kt b/compiler/testData/diagnostics/tests/EnumEntryAsType.kt
index eafd23d7bc7..ff475d00452 100644
--- a/compiler/testData/diagnostics/tests/EnumEntryAsType.kt
+++ b/compiler/testData/diagnostics/tests/EnumEntryAsType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
enum class Color {
diff --git a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
index f082a178313..e48130247c2 100644
--- a/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
+++ b/compiler/testData/diagnostics/tests/FunctionCalleeExpressions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
package foo
diff --git a/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt b/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
index 7a6a50f89f1..55e33e962af 100644
--- a/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
+++ b/compiler/testData/diagnostics/tests/FunctionReturnTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNREACHABLE_CODE
fun none() {}
diff --git a/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt b/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt
index f97d9568425..fcc15827204 100644
--- a/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt
+++ b/compiler/testData/diagnostics/tests/InvokeAndRecursiveResolve.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test() = 3
fun proxy(t: T) = t
diff --git a/compiler/testData/diagnostics/tests/Nullability.kt b/compiler/testData/diagnostics/tests/Nullability.kt
index 19791174e2d..63fc4f189b3 100644
--- a/compiler/testData/diagnostics/tests/Nullability.kt
+++ b/compiler/testData/diagnostics/tests/Nullability.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test() {
val a : Int? = 0
if (a != null) {
diff --git a/compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt b/compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt
index 19bbc758b52..fe2e2ca4e0c 100644
--- a/compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt
+++ b/compiler/testData/diagnostics/tests/PackageInExpressionPosition.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package foo
class X {}
diff --git a/compiler/testData/diagnostics/tests/PackageQualified.kt b/compiler/testData/diagnostics/tests/PackageQualified.kt
index 85fdd903ed0..a0f38399b6b 100644
--- a/compiler/testData/diagnostics/tests/PackageQualified.kt
+++ b/compiler/testData/diagnostics/tests/PackageQualified.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: b.kt
diff --git a/compiler/testData/diagnostics/tests/QualifiedExpressions.kt b/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
index d79a961fd84..8f213c1601a 100644
--- a/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
+++ b/compiler/testData/diagnostics/tests/QualifiedExpressions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package qualified_expressions
fun test(s: IntRange?) {
diff --git a/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt b/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt
index 68f6a2bf5ca..33f11d4dd12 100644
--- a/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt
+++ b/compiler/testData/diagnostics/tests/RecursiveTypeInference.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: f.kt
package a
val foo = bar()
diff --git a/compiler/testData/diagnostics/tests/ReserveYield.kt b/compiler/testData/diagnostics/tests/ReserveYield.kt
index 9795db76671..bd7d8aa8bed 100644
--- a/compiler/testData/diagnostics/tests/ReserveYield.kt
+++ b/compiler/testData/diagnostics/tests/ReserveYield.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION -UNREACHABLE_CODE -UNUSED_VARIABLE
// FILE: 1.kt
diff --git a/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt b/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt
index 52f218c07ec..2cfa9bdbbb5 100644
--- a/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt
+++ b/compiler/testData/diagnostics/tests/ResolveOfJavaGenerics.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// Fixpoint generic in Java: Enum>
fun test(a : java.lang.annotation.RetentionPolicy) {
diff --git a/compiler/testData/diagnostics/tests/ResolveToJava.kt b/compiler/testData/diagnostics/tests/ResolveToJava.kt
index e1688e0facf..0410c82411a 100644
--- a/compiler/testData/diagnostics/tests/ResolveToJava.kt
+++ b/compiler/testData/diagnostics/tests/ResolveToJava.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// FILE: f.kt
diff --git a/compiler/testData/diagnostics/tests/SafeCallInvoke.kt b/compiler/testData/diagnostics/tests/SafeCallInvoke.kt
index e374ecbdf72..355a8ec4d2a 100644
--- a/compiler/testData/diagnostics/tests/SafeCallInvoke.kt
+++ b/compiler/testData/diagnostics/tests/SafeCallInvoke.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Rule(val apply:() -> Unit)
fun bar() {}
diff --git a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt
index d93af55258a..eccc9ecef1c 100644
--- a/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt
+++ b/compiler/testData/diagnostics/tests/SafeCallNonNullReceiverReturnNull.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun Int.gg() = null
fun ff() {
diff --git a/compiler/testData/diagnostics/tests/TypeInference.kt b/compiler/testData/diagnostics/tests/TypeInference.kt
index cc74038bbc8..e96ab9b2d98 100644
--- a/compiler/testData/diagnostics/tests/TypeInference.kt
+++ b/compiler/testData/diagnostics/tests/TypeInference.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class C() {
fun foo() : T {}
}
diff --git a/compiler/testData/diagnostics/tests/Variance.kt b/compiler/testData/diagnostics/tests/Variance.kt
index da27ecfa5ba..4de5b052a5d 100644
--- a/compiler/testData/diagnostics/tests/Variance.kt
+++ b/compiler/testData/diagnostics/tests/Variance.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package variance
abstract class Consumer {}
diff --git a/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt b/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
index 8f8271728a3..d59acb87d36 100644
--- a/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
+++ b/compiler/testData/diagnostics/tests/annotations/AmbigiousAnnotationConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
import java.util.ArrayList
@ArrayList(1, 1) fun b() {}
diff --git a/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt b/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt
index c01858c41b6..f329a08dd2f 100644
--- a/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt
+++ b/compiler/testData/diagnostics/tests/annotations/kt1860-negative.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(@varargs f : Int) {}
var bar : Int = 1
diff --git a/compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt b/compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt
index 3c607124e81..c7fa0c571ee 100644
--- a/compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt
+++ b/compiler/testData/diagnostics/tests/annotations/kt1860-positive.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
@Target(AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.EXPRESSION)
annotation class test
diff --git a/compiler/testData/diagnostics/tests/annotations/options/functions.kt b/compiler/testData/diagnostics/tests/annotations/options/functions.kt
index bc3cc829184..39f0b1c5507 100644
--- a/compiler/testData/diagnostics/tests/annotations/options/functions.kt
+++ b/compiler/testData/diagnostics/tests/annotations/options/functions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
@Target(AnnotationTarget.FUNCTION)
annotation class FunAnn
diff --git a/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt b/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
index a49d7d7a8f3..f7ad5897fce 100644
--- a/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
+++ b/compiler/testData/diagnostics/tests/annotations/options/targets/field.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
@Target(AnnotationTarget.FIELD)
annotation class Field
diff --git a/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt b/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
index 0ad7a50a451..f070ce5c77c 100644
--- a/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/bound/reservedExpressionSyntax3.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
package test
diff --git a/compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt b/compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt
index 806d960ee23..4f27d448e65 100644
--- a/compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/function/extensionToSupertype.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt b/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
index 8b31dedd962..1fc3491945e 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/argumentAndReturnExpectedType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt b/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt
index d2733cf12db..2a8773369a4 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/explicitTypeArguments.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
fun takeFun(f: (T) -> Unit) {}
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt b/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt
index 620bc4e16f6..406a00ab6c0 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericExtensionFunction.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt
index 0f5aa5cf865..7598300d812 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/genericFunctionsWithNullableTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt b/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
index a794a1de2bb..2cddf1299a6 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/nestedCallWithOverload.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNUSED_PARAMETER
fun foo(i: Int) {}
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt
index 108efaf38c3..03bf4f4a467 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionGenericCallableWithNullableTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
index 725b51f54a5..74ebc672413 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/resolutionWithGenericCallable.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
fun test() {
diff --git a/compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt b/compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt
index aee3d92a0ac..cf174a5413b 100644
--- a/compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/generic/specialCalls.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
fun baz(i: Int) = i
diff --git a/compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt b/compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt
index 2354ecf0ba7..26f2448ab03 100644
--- a/compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/property/kt7945_unrelatedClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty1
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
index 9c17a48e44b..aa9226db750 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/byGenericArgType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun ofType(x: T): T = x
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
index 01aa24b26d3..a3d0c988b43 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/intersectionTypeOverloadWithWrongParameter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KCallable
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt
index caf1bbf4d4e..33279803ac6 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/withGenericFun.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun apply(x: T, f: (T) -> R): R = f(x)
diff --git a/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt b/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
index 39a5dffaf25..36c4d95792e 100644
--- a/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
+++ b/compiler/testData/diagnostics/tests/callableReference/resolve/withPlaceholderTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER,-CONFLICTING_JVM_DECLARATIONS
fun foo(i: Int) = "$i"
diff --git a/compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt b/compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt
index 766d7ffb719..e99f82e46bd 100644
--- a/compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt
+++ b/compiler/testData/diagnostics/tests/cast/AsInBinaryUnary.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface Base
diff --git a/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt b/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
index 7ad7babe2d3..4aba14b77f2 100644
--- a/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
+++ b/compiler/testData/diagnostics/tests/cast/AsInBlockWithReturnType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun runWithoutReturn(r: () -> Unit) = r()
diff --git a/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt b/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt
index 35a70d2d6bf..b34a1411048 100644
--- a/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt
+++ b/compiler/testData/diagnostics/tests/cast/UselessSafeCast.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
fun test(x: Int?) {
diff --git a/compiler/testData/diagnostics/tests/cast/kt15161.kt b/compiler/testData/diagnostics/tests/cast/kt15161.kt
index f4a9d94919e..85ae68b45ce 100644
--- a/compiler/testData/diagnostics/tests/cast/kt15161.kt
+++ b/compiler/testData/diagnostics/tests/cast/kt15161.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Array(e: E) {
val k = Array(1) {
1 as Any
diff --git a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
index 5f1d3560379..4d40493000d 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/SpreadVarargs.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
fun array1(vararg a : T) = a
diff --git a/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt b/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
index 7158ffebbcb..0f7e0eec970 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/arrayAccessSetTooManyArgs.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
diff --git a/compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt b/compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt
index 9f15afaee8d..ef0b86b1202 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/booleanExpressions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo1(b: Boolean, c: Int) {
if (b && c) {}
if (b || c) {}
diff --git a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
index 5294be69620..b28554c4250 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/kt1897_diagnostic_part.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-1897 When call cannot be resolved to any function, save information about types of arguments
package a
diff --git a/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt b/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
index 2a52f3b5925..b39c39f0d55 100644
--- a/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
+++ b/compiler/testData/diagnostics/tests/checkArguments/overloadedFunction.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
fun foo() {}
diff --git a/compiler/testData/diagnostics/tests/checkType.kt b/compiler/testData/diagnostics/tests/checkType.kt
index 7b01f120491..c6f3d382865 100644
--- a/compiler/testData/diagnostics/tests/checkType.kt
+++ b/compiler/testData/diagnostics/tests/checkType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
interface A
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt
index f9d6e64bfa7..4a44ef45a11 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotation.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ArrayLiteralsInAnnotations
annotation class Foo(val a: IntArray, val b: Array, val c: FloatArray)
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt
index 2c967f2cde4..22561de60ba 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/argumentsOfAnnotationWithKClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ArrayLiteralsInAnnotations
import kotlin.reflect.KClass
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt
index ccf2274f8f9..99756e64ef9 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/basicCollectionLiterals.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_VARIABLE, -UNSUPPORTED
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
index 06cbb746bf8..02bff8c55e5 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ArrayLiteralsInAnnotations
annotation class Ann1(vararg val a: String = [])
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt b/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
index 220cbc89ac2..883331c7713 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/defaultValuesInAnnotation.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ArrayLiteralsInAnnotations
annotation class Foo(
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
index 11ef6b1c999..d1293f821ff 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test(): Array {
[1, 2]
[1, 2][0]
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt
index a0c29641d42..cd8eebbfb56 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/UninitializedOrReassignedVariables.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package uninitialized_reassigned_variables
fun doSmth(s: String) {}
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt
index c1fe575449b..bfebe75b35d 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/elvisNotProcessed.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See KT-8277
val v = { true } ?: ( { true } ?: null!! )
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt
index 3ea55b08972..38e94442b8a 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/fieldAsClassDelegate.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See KT-15566
import DefaultHttpClient.client
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
index c5e39957b4d..1b3b86cbf64 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/kt10805.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// AssertionError for nested ifs with lambdas and Nothing as results
val fn = if (true) {
diff --git a/compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt b/compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt
index 95b25e9059f..8709111de38 100644
--- a/compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt
+++ b/compiler/testData/diagnostics/tests/controlFlowAnalysis/throwInLambda.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See KT-10913 Bogus unreachable code warning
fun fn() : String? = null
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt b/compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt
index feb535e47e4..419a961aa80 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ForLoopWithExtensionIteratorOnNullable.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See also KT-7428
class Container(val k: K)
// iterator() must be an extension, otherwise code will not compile
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt b/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
index 9dc0dc6b94f..63abe881206 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ifElseIntersection.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// See also KT-10896: Wrong inference of if / else result type
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifInResultOfLambda.kt b/compiler/testData/diagnostics/tests/controlStructures/ifInResultOfLambda.kt
index 55752e51bbe..4237d2bcdd5 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ifInResultOfLambda.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ifInResultOfLambda.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val test1 = { if (true) 1 else "" }
val test2 = { { if (true) 1 else "" } }
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt b/compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt
index aa9c231f221..d57f2448335 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
fun println() {}
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt b/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt
index d3de167ac60..a16550b46d7 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun idAny(x: Any) = x
fun id(x: T) = x
fun idUnit(x: Unit) = x
diff --git a/compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt b/compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt
index e47e1abb44a..419d599d6a7 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
fun example() {
diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt1075.kt b/compiler/testData/diagnostics/tests/controlStructures/kt1075.kt
index 7f7c701207d..16d87b415c0 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/kt1075.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/kt1075.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package kt1075
//KT-1075 No type check for 'in range' condition in 'when' expression
diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt4310.kt b/compiler/testData/diagnostics/tests/controlStructures/kt4310.kt
index 422cabb622d..a799a2887f3 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/kt4310.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/kt4310.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package f
fun test(a: Boolean, b: Boolean): Int {
diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt b/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt
index d35bb352c1b..374b3eb29e6 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNREACHABLE_CODE
package kt770_351_735
diff --git a/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt b/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt
index 08ff52dfa6a..14a9f354a07 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION
fun use(a: Any?) = a
diff --git a/compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt b/compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt
index d75b6abfe43..09c07f57eab 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/specialConstructsAndPlatformTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import java.util.*;
diff --git a/compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt b/compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt
index 58f53253516..fe469fa13e0 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
fun foo() : Int {
diff --git a/compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt b/compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt
index 79ee9129ff9..e57b12576f4 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/typeInferenceForExclExcl.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// FILE: A.java
public class A {
diff --git a/compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt b/compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt
index c1510a67e1d..e8374d893e0 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/whenInResultOfLambda.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val test1 = { when (true) { true -> 1; else -> "" } }
val test2 = { { when (true) { true -> 1; else -> "" } } }
diff --git a/compiler/testData/diagnostics/tests/cyclicHierarchy/kt303.kt b/compiler/testData/diagnostics/tests/cyclicHierarchy/kt303.kt
index 15b21898cf2..6a10987081e 100644
--- a/compiler/testData/diagnostics/tests/cyclicHierarchy/kt303.kt
+++ b/compiler/testData/diagnostics/tests/cyclicHierarchy/kt303.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-303 Stack overflow on a cyclic class hierarchy
open class Foo() : Bar() {
diff --git a/compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt b/compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt
index a5661ab9f2f..3697d06dd62 100644
--- a/compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt
+++ b/compiler/testData/diagnostics/tests/dataClasses/extensionComponentsOnNullable.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Data(val x: T, val y: T)
operator fun Data.component1() = x
diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.kt
index a108307440d..6eb295bee25 100644
--- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.kt
+++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpression.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
fun bar(x: Int): Int = x + 1
diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt
index 7a28dad77a9..317f7af809c 100644
--- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt
+++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ExclExcl.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun bar(x: Int) = x + 1
fun f1(x: Int?) {
diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt
index e0b97962f01..11b2ad64fa6 100644
--- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt
+++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/Return.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
fun bar(x: Int): Int = x + 1
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt b/compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt
index 9ac63bc9850..71e9390c6d3 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A {
operator fun component1() : Int = 1
operator fun component2() : Int = 2
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt b/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt
index 5233faf262c..4f0debaae31 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
class MyClass {
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt
index 429b1ab17d9..cc370383f35 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A {
operator fun component1() = 1
operator fun component2() = 1.0
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt
index 6eac4152c39..4215add1e0d 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun useDeclaredVariables() {
for ((a, b)) {
a
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt
index ed0d2c85b2b..c2df2eaa858 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A {
operator fun component1() = 1
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt b/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt
index f98be643f81..bddb32d6643 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
// !CHECK_TYPE
fun foo(block: () -> (() -> Int)) {}
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt
index 816fa153b03..90c36a214d7 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package baz
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt
index ea5516e6ec5..27bb40cc86f 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package foo
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.kt
index 2ab316c5184..e145febdca4 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/genericMethodInGenericClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.kt
index 4593f60bf84..8c2438f1695 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/manyIncompleteCandidates.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: main.kt
package test
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt
index dfbab18066d..bfb76a26ee3 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package foo
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.kt
index 665afee2ad5..dbf61dbbf42 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noExpectedTypeForSupertypeConstraint.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
import kotlin.reflect.KProperty
class A {
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt
index 2b4955d7f04..6ca8cd71cc2 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/useExpectedType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package foo
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt
index 6e8c8b35ee4..f2e246824bb 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/commonCaseForInference.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
object CommonCase {
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.kt
index 4431d542f5a..38555dbe7ae 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/hostAndReceiver2.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
object T2 {
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver1.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver1.kt
index e2fcf5fc23c..2353da77172 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver1.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver1.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
object Inference1 {
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt
index 251791843fa..10ae5d9bd85 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
object Inference2 {
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.kt
index f7f7426ec7a..6cc2b6c2221 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/noOperatorModifierOnProvideDelegate.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt
index c2029228de9..0ffc2b7123e 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Delegate
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt
index 037c7b6ff2f..ce168f0cb2a 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/unsupportedOperatorProvideDelegate.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !LANGUAGE: -OperatorProvideDelegate
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt b/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt
index 12b5c99b298..ed4910e17ae 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/recursiveType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.kt b/compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.kt
index f90603c7da2..dbd48b7771c 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/twoGetMethods.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.kt b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.kt
index faf7937226b..884b0ccfedb 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/typeMismatchForGetReturnType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
diff --git a/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt b/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt
index 137784e3065..e006456400e 100644
--- a/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/delegation/DelegationExpectedType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface A {
diff --git a/compiler/testData/diagnostics/tests/delegation/clashes/finalMemberOverridden.kt b/compiler/testData/diagnostics/tests/delegation/clashes/finalMemberOverridden.kt
index 5a99e5f74f4..dc6663af184 100644
--- a/compiler/testData/diagnostics/tests/delegation/clashes/finalMemberOverridden.kt
+++ b/compiler/testData/diagnostics/tests/delegation/clashes/finalMemberOverridden.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
open class Final {
fun foo() {}
val bar: Int = 0
diff --git a/compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/severalDelegates.kt b/compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/severalDelegates.kt
index 654daf60079..bd64c1c5372 100644
--- a/compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/severalDelegates.kt
+++ b/compiler/testData/diagnostics/tests/delegation/memberHidesSupertypeOverride/severalDelegates.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface Base1 {
fun test() = "OK"
}
diff --git a/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt b/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt
index 138537e348f..5aec4f66a06 100644
--- a/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt
+++ b/compiler/testData/diagnostics/tests/deparenthesize/checkDeparenthesizedType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
package m
diff --git a/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt b/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt
index 3ec5aaef662..852a7c91dba 100644
--- a/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt
+++ b/compiler/testData/diagnostics/tests/enum/kt8972_cloneNotAllowed.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
enum class E : Cloneable {
A;
override fun clone(): Any {
diff --git a/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt b/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt
index 634e3be3390..65a9cf90f7d 100644
--- a/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt
+++ b/compiler/testData/diagnostics/tests/extensions/ExtensionFunctions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: b.kt
package outer
diff --git a/compiler/testData/diagnostics/tests/extensions/classObject.kt b/compiler/testData/diagnostics/tests/extensions/classObject.kt
index e6d4e5aa45f..59081a07c2b 100644
--- a/compiler/testData/diagnostics/tests/extensions/classObject.kt
+++ b/compiler/testData/diagnostics/tests/extensions/classObject.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface Tr
class A { companion object }
diff --git a/compiler/testData/diagnostics/tests/extensions/kt1875.kt b/compiler/testData/diagnostics/tests/extensions/kt1875.kt
index 107e9706daf..032595a5271 100644
--- a/compiler/testData/diagnostics/tests/extensions/kt1875.kt
+++ b/compiler/testData/diagnostics/tests/extensions/kt1875.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-1875 Safe call should be binded with receiver or this object (but not with both by default)
package kt1875
diff --git a/compiler/testData/diagnostics/tests/extensions/kt3563.kt b/compiler/testData/diagnostics/tests/extensions/kt3563.kt
index 513a9e9f9b2..ff7ec890495 100644
--- a/compiler/testData/diagnostics/tests/extensions/kt3563.kt
+++ b/compiler/testData/diagnostics/tests/extensions/kt3563.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-3563 Compiler requiring java.io.File, and it's unclear why
package bar
diff --git a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt
index 07fa453d885..5eb7c0d0178 100644
--- a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt
+++ b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package bar
diff --git a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt
index c19cb196d95..ed920c74b81 100644
--- a/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt
+++ b/compiler/testData/diagnostics/tests/extensions/throwOutCandidatesByReceiver2.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
class A {}
diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/FunctionType.kt b/compiler/testData/diagnostics/tests/functionAsExpression/FunctionType.kt
index e7b9ef3c3a5..fe07efb7534 100644
--- a/compiler/testData/diagnostics/tests/functionAsExpression/FunctionType.kt
+++ b/compiler/testData/diagnostics/tests/functionAsExpression/FunctionType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/InferenceParametersTypes.kt b/compiler/testData/diagnostics/tests/functionAsExpression/InferenceParametersTypes.kt
index 9a24fd7c65a..72e7f6bdd2d 100644
--- a/compiler/testData/diagnostics/tests/functionAsExpression/InferenceParametersTypes.kt
+++ b/compiler/testData/diagnostics/tests/functionAsExpression/InferenceParametersTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
fun listOf(): List = null!!
diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.kt b/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.kt
index 62d4dd0a1ee..962f0c4e082 100644
--- a/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.kt
+++ b/compiler/testData/diagnostics/tests/functionAsExpression/MissingParameterTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/ReceiverByExpectedType.kt b/compiler/testData/diagnostics/tests/functionAsExpression/ReceiverByExpectedType.kt
index a2bfae79869..18547d8c814 100644
--- a/compiler/testData/diagnostics/tests/functionAsExpression/ReceiverByExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/functionAsExpression/ReceiverByExpectedType.kt
@@ -1,2 +1,3 @@
+// !WITH_NEW_INFERENCE
fun foo(f: String.() -> Int) {}
val test = foo( Int; \(\) -> [ERROR : Error function type])!>fun () = length)
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt b/compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt
index f6cb5721cee..75465b07f91 100644
--- a/compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt
+++ b/compiler/testData/diagnostics/tests/functionAsExpression/WithGenericParameters.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
interface A
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/DeprecatedSyntax.kt b/compiler/testData/diagnostics/tests/functionLiterals/DeprecatedSyntax.kt
index 9960a9dba67..39b118e1314 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/DeprecatedSyntax.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/DeprecatedSyntax.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val receiver = { Int.() -> }
val receiverWithParameter = { Int.(a) -> }
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt
index a173e7acc79..36d113e6f6f 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParameterTypeMismatchVariance.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_ANONYMOUS_PARAMETER
package a
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt
index 8071686eb5b..80055a25e80 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/ExpectedParametersTypesMismatch.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
fun foo0(f: () -> String) = f
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt b/compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt
index c8c478764ea..463ed38da0d 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/LabeledFunctionLiterals.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package h
//traits to make ambiguity with function literal as an argument
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.kt b/compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.kt
index 27e90c69698..97c91909c6c 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/assignmentOperationInLambdaWithExpectedType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test(bal: Array) {
var bar = 4
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt
index 1370410d3f4..dce0cffe9f8 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/complexInference.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
data class A(val x: Int, val y: String)
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt
index a4ef09e64d3..b6ef60e8d0d 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/inferredFunctionalType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
data class A(val x: Int, val y: String)
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt
index 2ecb86601d6..fe723635302 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/noExpectedType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_VARIABLE
data class A(val x: Int, val y: String)
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt
index 20cc6a5b5ab..336a64b5aed 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/redeclaration.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
data class A(val x: Int, val y: String)
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.kt
index fa9444c5edb..60ae9193374 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/simple.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
data class A(val x: Int, val y: String)
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt
index d57f89a6d2a..d7a1fe4254a 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/destructuringInLambdas/underscore.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
data class A(val x: Int, val y: String)
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt b/compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt
index 678ab68bc0c..2052b15b123 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/functionLIteralInBlockInIf.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
fun test() {
val a = if (true) {
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt b/compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt
index b007414c1bd..7250191e86c 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/functionLiteralInIf.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_EXPRESSION
import java.util.HashSet
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.kt b/compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.kt
index 8ba973183f8..806c8d44bfb 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/kt7383_starProjectedFunction.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-7383 Assertion failed when a star-projection of function type is used
fun foo() {
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt b/compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt
index 0abb7428ca6..0ad96640de8 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/return/ForbiddenNonLocalReturnNoType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test() {
run {return}
run {}
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNoCoercionToUnit.kt b/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNoCoercionToUnit.kt
index 758b5b2a188..248d8870097 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNoCoercionToUnit.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnNoCoercionToUnit.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test(a: Int) {
run f@{
if (a > 0) return@f
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitAndDontCareType.kt b/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitAndDontCareType.kt
index 6a4952a6644..fc408905233 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitAndDontCareType.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnUnitAndDontCareType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val flag = true
// type of a was checked by txt
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnsWithExplicitReturnType.kt b/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnsWithExplicitReturnType.kt
index cbd5a98bb4d..955b61ef6f6 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnsWithExplicitReturnType.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/return/LocalReturnsWithExplicitReturnType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test(a: Int) {
runf@{
if (a > 0) return@f ""
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/return/NoCommonSystem.kt b/compiler/testData/diagnostics/tests/functionLiterals/return/NoCommonSystem.kt
index c5f1c089d53..bfdbecca669 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/return/NoCommonSystem.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/return/NoCommonSystem.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun Iterable.map(transform: (T) -> R): List = null!!
fun listOf(): List = null!!
fun listOf(vararg values: T): List = null!!
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/return/SmartCast.kt b/compiler/testData/diagnostics/tests/functionLiterals/return/SmartCast.kt
index 58a53681e48..2a27046970a 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/return/SmartCast.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/return/SmartCast.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-6822 Smart cast doesn't work inside local returned expression in lambda
val a /* :(Int?) -> Int? */ = l@ { it: Int? -> // but must be (Int?) -> Int
diff --git a/compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt b/compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt
index bfb9427eff2..2db929cb4d7 100644
--- a/compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt
+++ b/compiler/testData/diagnostics/tests/functionLiterals/returnNullWithReturn.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package m
interface Element
diff --git a/compiler/testData/diagnostics/tests/generics/Projections.kt b/compiler/testData/diagnostics/tests/generics/Projections.kt
index 0dfd5a8fd99..a8fc7e2d544 100644
--- a/compiler/testData/diagnostics/tests/generics/Projections.kt
+++ b/compiler/testData/diagnostics/tests/generics/Projections.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
class In() {
diff --git a/compiler/testData/diagnostics/tests/generics/capturedParameters/innerLocalClass.kt b/compiler/testData/diagnostics/tests/generics/capturedParameters/innerLocalClass.kt
index 52b4443fdb8..c11d66dbe0e 100644
--- a/compiler/testData/diagnostics/tests/generics/capturedParameters/innerLocalClass.kt
+++ b/compiler/testData/diagnostics/tests/generics/capturedParameters/innerLocalClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
private class Outer {
private inner class Inner {
diff --git a/compiler/testData/diagnostics/tests/generics/capturedParameters/localClass.kt b/compiler/testData/diagnostics/tests/generics/capturedParameters/localClass.kt
index a15270d8bb9..983949fc3e9 100644
--- a/compiler/testData/diagnostics/tests/generics/capturedParameters/localClass.kt
+++ b/compiler/testData/diagnostics/tests/generics/capturedParameters/localClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
fun magic(): T = null!!
diff --git a/compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.kt b/compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.kt
index 37af4b63f8f..08cd7c2008a 100644
--- a/compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.kt
+++ b/compiler/testData/diagnostics/tests/generics/capturedParameters/objectLiteral.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
fun magic(): T = null!!
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt
index 748e1b72a9b..5ccf784ff3a 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/bareTypesComplex.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
open class SuperOuter {
inner open class SuperInner
}
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.kt
index 9c539118aaf..8a32be9017b 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocal.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER -TOPLEVEL_TYPEALIASES_ONLY
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.kt
index 9828d09cbf6..0c22f8c68f5 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromSuperClassesLocalInsideInner.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_VALUE -VARIABLE_WITH_REDUNDANT_INITIALIZER -TOPLEVEL_TYPEALIASES_ONLY
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/secondLevelDepth.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/secondLevelDepth.kt
index 0f232098c81..777355ae7eb 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/secondLevelDepth.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/secondLevelDepth.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
open class Outer {
inner open class Inner {
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCall.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCall.kt
index 64d4139d014..3f48aaab774 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCall.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCall.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
open class Super {
inner open class Inner {
}
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCallSecondary.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCallSecondary.kt
index 9d96d736e46..0855809c2d5 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCallSecondary.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/innerSuperCallSecondary.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
open class Super {
inner open class Inner {
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.kt
index 792b62bcd46..4eb8d8d9178 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/innerTP.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.kt
index 497f46f649c..61dcd896d1d 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/innerUncheckedCast.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
class Outer {
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt
index 1c981b2b132..f07b22b1fbf 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/iterator.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_VARIABLE
// JAVAC_EXPECTED_FILE
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/kt3357.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/kt3357.kt
index 795e8235a6c..0cb6cd85823 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/kt3357.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/kt3357.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
open class Super {
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt
index 893484a9c1f..ca81c14fa53 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/qualifiedOuter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VALUE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.kt b/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.kt
index eb6bf8de9f7..7aaca427048 100644
--- a/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.kt
+++ b/compiler/testData/diagnostics/tests/generics/innerClasses/simpleOutUseSite.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER
diff --git a/compiler/testData/diagnostics/tests/generics/kt5508.kt b/compiler/testData/diagnostics/tests/generics/kt5508.kt
index f1bbe71ad06..7062b816b57 100644
--- a/compiler/testData/diagnostics/tests/generics/kt5508.kt
+++ b/compiler/testData/diagnostics/tests/generics/kt5508.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-5508 Stackoverflow in type substitution
abstract class A {
diff --git a/compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/simple.kt b/compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/simple.kt
index 161252d172c..3a76b1ca50c 100644
--- a/compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/simple.kt
+++ b/compiler/testData/diagnostics/tests/generics/multipleBoundsMemberScope/simple.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface A {
fun foo()
}
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.kt b/compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.kt
index 8362320b54f..45cd5f14c74 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/expressionsBoundsViolation.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A(x: T)
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.kt b/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.kt
index 2944a0a2b31..973281e0a3a 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/functionalBound.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun Unit)?> foo(x: E, y: T) {
if (x != null) {
y(x)
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt b/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt
index cb3ab821ee7..e9c0731c2f9 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/smartCasts.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION,-UNUSED_VARIABLE
fun T.bar1() {}
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt
index c2a338f311e..0de3ad6dcdb 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsOnThis.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION,-UNUSED_VARIABLE
fun T.bar1() {}
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.kt b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.kt
index 44a0cc89a9f..b801df60ee9 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/smartCastsValueArgument.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION,-UNUSED_VARIABLE,-UNUSED_PARAMETER,-ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE,-UNUSED_VALUE
fun bar1(x: T) {}
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.kt b/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.kt
index 9ca0087d34c..0e17f24a8dd 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolation.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.kt b/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.kt
index e7f9482058d..70f8276d48a 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/tpBoundsViolationVariance.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/tpInBounds.kt b/compiler/testData/diagnostics/tests/generics/nullability/tpInBounds.kt
index e393b7b4322..2294e02915e 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/tpInBounds.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/tpInBounds.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VALUE,-UNUSED_VARIABLE,-ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE,-VARIABLE_WITH_REDUNDANT_INITIALIZER
class A {
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/useAsReceiver.kt b/compiler/testData/diagnostics/tests/generics/nullability/useAsReceiver.kt
index 97f7a10bcba..e3cba2c3ef7 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/useAsReceiver.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/useAsReceiver.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION,-UNUSED_VARIABLE
fun T.bar1() {}
diff --git a/compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.kt b/compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.kt
index 31fc65f1188..7f16af75a96 100644
--- a/compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.kt
+++ b/compiler/testData/diagnostics/tests/generics/nullability/useAsValueArgument.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER,-UNUSED_VARIABLE
fun bar1(x: T) {}
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.kt
index 34d76502651..145d8025b7f 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/addAll.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface C
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt
index 095cb7d57d0..2960cf6ee1d 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/extensionReceiverTypeMismatch.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A {
fun T.foo() {}
fun Out.bar() {}
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.kt
index de5ad6f737b..373488c4532 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/inValueParameter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface A
interface B {
fun foo(x: A)
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt
index 4f8daf124d9..cc6e478e06a 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/kt7296.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// !CHECK_TYPE
import java.util.ArrayList
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.kt
index 08cb1fceb7d..b9db4771da5 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/multipleArgumentProjectedOut.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt
index 9762496f347..63f2e9eb509 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/platformSuperClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// FILE: Clazz.java
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.kt
index 0732c604eb1..917a086b378 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutConventions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.kt
index 25493b567cf..7f35dd08477 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/projectedOutSmartCast.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Inv
class C {
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/starNullabilityRecursive.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/starNullabilityRecursive.kt
index 2b1566a3263..7a5f0dc7fdd 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/starNullabilityRecursive.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/starNullabilityRecursive.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !CHECK_TYPE
interface A?> {
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.kt
index 9dde6a18ee4..4a56a7cbfbf 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchConventions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchInLambda.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchInLambda.kt
index b56674cf621..b03262c184d 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchInLambda.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeMismatchInLambda.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
class Out {
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt
index 653a6e9875e..dde6e02ea3a 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/typeParameterBounds.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/unsafeVarianceStar.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/unsafeVarianceStar.kt
index c310b307b1b..10f4635a1d4 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/unsafeVarianceStar.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/unsafeVarianceStar.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface A {
fun foo(x: @UnsafeVariance K): Unit
diff --git a/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.kt b/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.kt
index cc4f65e127e..7a1cce87ec8 100644
--- a/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.kt
+++ b/compiler/testData/diagnostics/tests/generics/projectionsScope/varargs.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
diff --git a/compiler/testData/diagnostics/tests/generics/starProjections/invalid.kt b/compiler/testData/diagnostics/tests/generics/starProjections/invalid.kt
index 4885be01a82..dd447e7e163 100644
--- a/compiler/testData/diagnostics/tests/generics/starProjections/invalid.kt
+++ b/compiler/testData/diagnostics/tests/generics/starProjections/invalid.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: main.kt
diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/CapturedAsReified.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/CapturedAsReified.kt
index 97b84e5fdb2..7df95fbe8ed 100644
--- a/compiler/testData/diagnostics/tests/generics/tpAsReified/CapturedAsReified.kt
+++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/CapturedAsReified.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A
diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt
index a70b1a88fb6..64e74e83ac8 100644
--- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt
+++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class C<reified T>
fun id(p: T): T = p
diff --git a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt
index e617acb2794..83586f9d836 100644
--- a/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt
+++ b/compiler/testData/diagnostics/tests/generics/tpAsReified/InFunction.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
inline fun f(): T = throw UnsupportedOperationException()
diff --git a/compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.kt b/compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.kt
index a8e5ad6ef17..4a0b5e0b59b 100644
--- a/compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.kt
+++ b/compiler/testData/diagnostics/tests/generics/wrongNumberOfTypeArgumentsDiagnostic.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
fun myFun(i : String) {}
diff --git a/compiler/testData/diagnostics/tests/implicitIntersection.kt b/compiler/testData/diagnostics/tests/implicitIntersection.kt
index ea537a4f67d..767bb9d8f2d 100644
--- a/compiler/testData/diagnostics/tests/implicitIntersection.kt
+++ b/compiler/testData/diagnostics/tests/implicitIntersection.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See KT-10244: no intersection types in signatures
open class B
interface A
diff --git a/compiler/testData/diagnostics/tests/implicitNestedIntersection.kt b/compiler/testData/diagnostics/tests/implicitNestedIntersection.kt
index f65fbf7af98..ab22fd44757 100644
--- a/compiler/testData/diagnostics/tests/implicitNestedIntersection.kt
+++ b/compiler/testData/diagnostics/tests/implicitNestedIntersection.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface In
diff --git a/compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt b/compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt
index 8fd712b72c3..3995f1a3d6a 100644
--- a/compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt
+++ b/compiler/testData/diagnostics/tests/imports/ClassClashStarImport.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// MODULE: m1
// FILE: a.kt
package a
diff --git a/compiler/testData/diagnostics/tests/imports/Imports.kt b/compiler/testData/diagnostics/tests/imports/Imports.kt
index 5471b1dc1b3..7eebbd7e862 100644
--- a/compiler/testData/diagnostics/tests/imports/Imports.kt
+++ b/compiler/testData/diagnostics/tests/imports/Imports.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE:a.kt
package a
diff --git a/compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt b/compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt
index 715a39b2ef9..8bda41d1e59 100644
--- a/compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt
+++ b/compiler/testData/diagnostics/tests/incompleteCode/NoSenselessComparisonForErrorType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
fun foo() {
diff --git a/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt b/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt
index 0cb20292f0a..91d52676ab0 100644
--- a/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt
+++ b/compiler/testData/diagnostics/tests/incompleteCode/checkNothingIsSubtype.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION
package d
diff --git a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt
index c94d9ba916f..3913636d7a1 100644
--- a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt
+++ b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/arrayExpression.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package bar
fun main(args : Array) {
diff --git a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.kt b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.kt
index 653cbeefbfe..f9d78e58d58 100644
--- a/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.kt
+++ b/compiler/testData/diagnostics/tests/incompleteCode/diagnosticWithSyntaxError/noTypeParamsInReturnType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package b
fun foo(map: Map) : R = throw Exception()
diff --git a/compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt b/compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt
index ca4a8354714..105c52570db 100644
--- a/compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt
+++ b/compiler/testData/diagnostics/tests/incompleteCode/plusOnTheRight.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//EA-35646
package a
diff --git a/compiler/testData/diagnostics/tests/incompleteCode/unresolvedArguments.kt b/compiler/testData/diagnostics/tests/incompleteCode/unresolvedArguments.kt
index d0ce762d0c9..4a75d5f5fd9 100644
--- a/compiler/testData/diagnostics/tests/incompleteCode/unresolvedArguments.kt
+++ b/compiler/testData/diagnostics/tests/incompleteCode/unresolvedArguments.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//!DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(i: Int, t: T) {}
diff --git a/compiler/testData/diagnostics/tests/inference/NoInferenceFromDeclaredBounds.kt b/compiler/testData/diagnostics/tests/inference/NoInferenceFromDeclaredBounds.kt
index 194a175514e..edea397de01 100644
--- a/compiler/testData/diagnostics/tests/inference/NoInferenceFromDeclaredBounds.kt
+++ b/compiler/testData/diagnostics/tests/inference/NoInferenceFromDeclaredBounds.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun fooT22() : T? {
return null
}
diff --git a/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt b/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt
index ed4983a3b70..3570d05b2fd 100644
--- a/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt
+++ b/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveAmbiguity.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package f
fun g(i: Int, a: Any): List {throw Exception()}
diff --git a/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveFunctionLiteralsNoUse.kt b/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveFunctionLiteralsNoUse.kt
index 19e634dab1a..7612c3c1486 100644
--- a/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveFunctionLiteralsNoUse.kt
+++ b/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveFunctionLiteralsNoUse.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package f
fun h(i: Int, a: Any, r: R, f: (Boolean) -> Int) = 1
diff --git a/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoInfoForParameter.kt b/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoInfoForParameter.kt
index 2f94a9d5969..7f8743b403c 100644
--- a/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoInfoForParameter.kt
+++ b/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveNoInfoForParameter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package f
fun f(i: Int, c: Collection): List {throw Exception()}
diff --git a/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt b/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt
index dd918b55721..d7d76c38d74 100644
--- a/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/inference/cannotCompleteResolveWithFunctionLiterals.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS
package f
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt
index 766b703d065..dabed9fa662 100644
--- a/compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt
+++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/cannotCaptureInProjection.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
// !CHECK_TYPE
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt
index b23a9f47b76..1f1c83f0fbf 100644
--- a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt
+++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureForNullableTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
// !CHECK_TYPE
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt
index 02da1063d49..591fda58129 100644
--- a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt
+++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureFromNullableTypeVariable.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
fun Array.filterNotNull(): List = throw Exception()
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.kt
index dd8cc5160f8..5a52a01ca24 100644
--- a/compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.kt
+++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/captureTypeOnlyOnTopLevel.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
fun foo(array: Array>): Array> = array
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeMismatchWithInVariance.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeMismatchWithInVariance.kt
index 9b18b7171bf..8c0a76f4bdd 100644
--- a/compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeMismatchWithInVariance.kt
+++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/expectedTypeMismatchWithInVariance.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
fun foo(a1: Array, a2: Array): T = null!!
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt
index bd8fe9249b7..29c6181f528 100644
--- a/compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt
+++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/kt2872.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun Array.foo() {}
fun test(array: Array) {
diff --git a/compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.kt b/compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.kt
index be913887a32..7f16b138834 100644
--- a/compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.kt
+++ b/compiler/testData/diagnostics/tests/inference/capturedTypes/noCaptureTypeErrorForNonTopLevel.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A
class B
diff --git a/compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.kt b/compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.kt
index 8890716f100..48ac8d509d7 100644
--- a/compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.kt
+++ b/compiler/testData/diagnostics/tests/inference/completeInferenceIfManyFailed.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
package d
diff --git a/compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt b/compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt
index f2cfd6463b1..40276d01a9e 100644
--- a/compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt
+++ b/compiler/testData/diagnostics/tests/inference/conflictingSubstitutions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package conflictingSubstitutions
//+JDK
diff --git a/compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt b/compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt
index cb4aefda33a..e8996f316a1 100644
--- a/compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt
+++ b/compiler/testData/diagnostics/tests/inference/constraints/constraintOnFunctionLiteral.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package c
import java.util.ArrayList
diff --git a/compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt b/compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt
index 8adaa83b7eb..38b0c794753 100644
--- a/compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt
+++ b/compiler/testData/diagnostics/tests/inference/constraints/ignoreConstraintFromImplicitInNothing.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt b/compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt
index 927c9e165a2..74eeb419295 100644
--- a/compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt
+++ b/compiler/testData/diagnostics/tests/inference/constraints/kt6320.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// AssertionError in ConstraintSystem(The constraint shouldn't contain different type variables on both sides: Y <: X)
diff --git a/compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt b/compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt
index efc56fafdd7..ec7b60abc35 100644
--- a/compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt
+++ b/compiler/testData/diagnostics/tests/inference/constraints/kt8879.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
interface Inv
diff --git a/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt b/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt
index 723967042de..15cfdf928a1 100644
--- a/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt
+++ b/compiler/testData/diagnostics/tests/inference/constraints/notNullConstraintOnNullableType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
interface A
diff --git a/compiler/testData/diagnostics/tests/inference/dependantOnVariance.kt b/compiler/testData/diagnostics/tests/inference/dependantOnVariance.kt
index 56381cffdac..7adf98ab05d 100644
--- a/compiler/testData/diagnostics/tests/inference/dependantOnVariance.kt
+++ b/compiler/testData/diagnostics/tests/inference/dependantOnVariance.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
class MyList(t: T) {}
diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt
index e125bc93a36..23c96b564e3 100644
--- a/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt
+++ b/compiler/testData/diagnostics/tests/inference/expectedTypeAdditionalTest.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ExpectedTypeFromCast
fun foo() = 1
diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt
index df910514039..cfebb38723f 100644
--- a/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt
+++ b/compiler/testData/diagnostics/tests/inference/expectedTypeDoubleReceiver.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ExpectedTypeFromCast
fun foo(): T = TODO()
diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.kt
index f10da90f086..61409ea986c 100644
--- a/compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.kt
+++ b/compiler/testData/diagnostics/tests/inference/expectedTypeFromCast.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ExpectedTypeFromCast
fun foo(): T = TODO()
diff --git a/compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.kt b/compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.kt
index ed23efe4353..a6f96a1857d 100644
--- a/compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.kt
+++ b/compiler/testData/diagnostics/tests/inference/expectedTypeWithGenerics.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ExpectedTypeFromCast
class X {
diff --git a/compiler/testData/diagnostics/tests/inference/findViewById.kt b/compiler/testData/diagnostics/tests/inference/findViewById.kt
index 3ab2d546c51..f6b623dc3c1 100644
--- a/compiler/testData/diagnostics/tests/inference/findViewById.kt
+++ b/compiler/testData/diagnostics/tests/inference/findViewById.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ExpectedTypeFromCast
// !DIAGNOSTICS: -UNUSED_VARIABLE -DEBUG_INFO_LEAKING_THIS
diff --git a/compiler/testData/diagnostics/tests/inference/fixationOrderForProperConstraints.kt b/compiler/testData/diagnostics/tests/inference/fixationOrderForProperConstraints.kt
index a6774970834..3680c8a8dc2 100644
--- a/compiler/testData/diagnostics/tests/inference/fixationOrderForProperConstraints.kt
+++ b/compiler/testData/diagnostics/tests/inference/fixationOrderForProperConstraints.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(f: (Y) -> Z, g: (X) -> Y, x: X): Z = f(g(x))
// TODO: Actually, this is a bug and will work when new inference is enabled
diff --git a/compiler/testData/diagnostics/tests/inference/functionPlaceholderError.kt b/compiler/testData/diagnostics/tests/inference/functionPlaceholderError.kt
index 4ce54872d69..ad543a0cad3 100644
--- a/compiler/testData/diagnostics/tests/inference/functionPlaceholderError.kt
+++ b/compiler/testData/diagnostics/tests/inference/functionPlaceholderError.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
package a
diff --git a/compiler/testData/diagnostics/tests/inference/implicitInvokeExtensionWithFunctionalArgument.kt b/compiler/testData/diagnostics/tests/inference/implicitInvokeExtensionWithFunctionalArgument.kt
index ffa8e33ab09..a49f68b34e0 100644
--- a/compiler/testData/diagnostics/tests/inference/implicitInvokeExtensionWithFunctionalArgument.kt
+++ b/compiler/testData/diagnostics/tests/inference/implicitInvokeExtensionWithFunctionalArgument.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/inference/implicitInvokeInCompanionObjectWithFunctionalArgument.kt b/compiler/testData/diagnostics/tests/inference/implicitInvokeInCompanionObjectWithFunctionalArgument.kt
index 9394ac708a4..97ce5d18665 100644
--- a/compiler/testData/diagnostics/tests/inference/implicitInvokeInCompanionObjectWithFunctionalArgument.kt
+++ b/compiler/testData/diagnostics/tests/inference/implicitInvokeInCompanionObjectWithFunctionalArgument.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/inference/implicitInvokeInObjectWithFunctionalArgument.kt b/compiler/testData/diagnostics/tests/inference/implicitInvokeInObjectWithFunctionalArgument.kt
index bb85a8fa1bd..f34d2b764c4 100644
--- a/compiler/testData/diagnostics/tests/inference/implicitInvokeInObjectWithFunctionalArgument.kt
+++ b/compiler/testData/diagnostics/tests/inference/implicitInvokeInObjectWithFunctionalArgument.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/inference/implicitInvokeWithFunctionLiteralArgument.kt b/compiler/testData/diagnostics/tests/inference/implicitInvokeWithFunctionLiteralArgument.kt
index ecd2ad7d1f1..4543d049289 100644
--- a/compiler/testData/diagnostics/tests/inference/implicitInvokeWithFunctionLiteralArgument.kt
+++ b/compiler/testData/diagnostics/tests/inference/implicitInvokeWithFunctionLiteralArgument.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/inference/kt6175.kt b/compiler/testData/diagnostics/tests/inference/kt6175.kt
index 2d6daec3357..319c9027ddd 100644
--- a/compiler/testData/diagnostics/tests/inference/kt6175.kt
+++ b/compiler/testData/diagnostics/tests/inference/kt6175.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER
fun foo(body: (R?) -> T): T = fail()
diff --git a/compiler/testData/diagnostics/tests/inference/lambdaInValInitializerWithAnonymousFunctions.kt b/compiler/testData/diagnostics/tests/inference/lambdaInValInitializerWithAnonymousFunctions.kt
index ed26c78819f..b19b980a49b 100644
--- a/compiler/testData/diagnostics/tests/inference/lambdaInValInitializerWithAnonymousFunctions.kt
+++ b/compiler/testData/diagnostics/tests/inference/lambdaInValInitializerWithAnonymousFunctions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
typealias SuspendFn = suspend () -> Unit
val test1f: suspend () -> Unit = fun () {}
diff --git a/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt b/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt
index 279645dd144..3c6c09244f0 100644
--- a/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt
+++ b/compiler/testData/diagnostics/tests/inference/nestedCalls/binaryExpressions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package h
interface A {}
diff --git a/compiler/testData/diagnostics/tests/inference/noInformationForParameter.kt b/compiler/testData/diagnostics/tests/inference/noInformationForParameter.kt
index 44e6a4aa14f..8f92bcf2553 100644
--- a/compiler/testData/diagnostics/tests/inference/noInformationForParameter.kt
+++ b/compiler/testData/diagnostics/tests/inference/noInformationForParameter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package noInformationForParameter
//+JDK
diff --git a/compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt b/compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt
index ac21d9d1e63..41725c17216 100644
--- a/compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt
+++ b/compiler/testData/diagnostics/tests/inference/possibleCycleOnConstraints.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
import java.util.*
diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt
index 6213b43563d..42bdc16b623 100644
--- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt
+++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/localFactorial.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See KT-6271
fun foo() {
fun fact(n: Int) = {
diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt
index bd777a778b3..cbab2f383cd 100644
--- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt
+++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveFun.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo() {
fun bar() = (fun() = bar())
}
diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt
index 016f29e7f66..671b014f84a 100644
--- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt
+++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/recursiveLambda.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo() {
fun bar() = {
bar()
diff --git a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt
index a37cd9f43a7..e19e142a5ed 100644
--- a/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt
+++ b/compiler/testData/diagnostics/tests/inference/recursiveLocalFuns/selfCall.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo() {
fun bar1() = bar1()
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt1127.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt1127.kt
index 0dcb454384e..426f4d27b42 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt1127.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt1127.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-1127 Wrong type computed for Arrays.asList()
package d
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2200.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2200.kt
index 6ea311e2e5a..c12dbaee9f2 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt2200.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2200.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
//KT-2200 array(array()) breaks compiler
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt
index 772a0369995..15a8d3bd6d1 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2283.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-2283 Bad diagnostics of failed type inference
package a
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2286.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2286.kt
index dcdb09ce8b9..83e1c50f69f 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt2286.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2286.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-2286 Improve error message for nullability check failure for extension methods
package n
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt
index 119668b1f45..0b6f5fd0725 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2445.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNREACHABLE_CODE
//KT-2445 Calling method with function with generic parameter causes compile-time exception
package a
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt
index f16eaffd65f..26bb1a1d789 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2838.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNREACHABLE_CODE
//KT-2838 Type inference failed on passing null as a nullable argument
package a
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt2883.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt2883.kt
index 655fc075a15..41ff491b637 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt2883.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt2883.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-2883 Type inference fails due to non-Unit value returned
package a
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt731.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt731.kt
index 5cc30c98bd3..6a401ead88e 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt731.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt731.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
//KT-731 Missing error from type inference
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt742.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt742.kt
index 79c1e172fff..15acaeaf16b 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt742.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt742.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-742 Stack overflow in type inference
package a
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt832.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt832.kt
index ed3b8d7f7f1..91f7533fcad 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt832.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt832.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-832 Provide better diagnostics when type inference fails for an expression that returns a function
package a
diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt948.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt948.kt
index d74ad11e5f7..930d820ceec 100644
--- a/compiler/testData/diagnostics/tests/inference/regressions/kt948.kt
+++ b/compiler/testData/diagnostics/tests/inference/regressions/kt948.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
//KT-948 Make type inference work with sure()/!!
diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt
index 39486a0a4b9..cfe752c3f8e 100644
--- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt
+++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/FunctionPlaceholder.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//For testing error messages text see DiagnosticMessageTest.testFunctionPlaceholder
package a
diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.kt
index 00f08e35c7a..b1c17d01828 100644
--- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.kt
+++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/cannotInferParameterTypeWithInference.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package aa
fun foo(block: (T)-> R) = block
diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/subtypeForInvariantWithErrorGenerics.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/subtypeForInvariantWithErrorGenerics.kt
index 2328f54367d..de261ca2218 100644
--- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/subtypeForInvariantWithErrorGenerics.kt
+++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/subtypeForInvariantWithErrorGenerics.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
fun foo (f: ()->R, r: MutableList) = r.add(f())
diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnComponentN.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnComponentN.kt
index 4a222df93bb..2a691505f29 100644
--- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnComponentN.kt
+++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnComponentN.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
class X
diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.kt
index 38d52e18f2a..4e69ae4d0cd 100644
--- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.kt
+++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/typeInferenceFailedOnIteratorCall.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class X
operator fun X.iterator(): Iterable = TODO()
diff --git a/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.kt b/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.kt
index b38f78d7d05..b46e39f8f5b 100644
--- a/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.kt
+++ b/compiler/testData/diagnostics/tests/inference/reportingImprovements/wrongArgumentPassedToLocalExtensionFunction.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// WITH_RUNTIME
fun Runnable.test(f: Runnable.(Int) -> Unit) {
diff --git a/compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.kt b/compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.kt
index 82e2ca5519e..ca3c48be5c8 100644
--- a/compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.kt
+++ b/compiler/testData/diagnostics/tests/inference/typeConstructorMismatch.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package typeConstructorMismatch
//+JDK
diff --git a/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt b/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt
index bb82cbf7d16..28c83bc7ee3 100644
--- a/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt
+++ b/compiler/testData/diagnostics/tests/inference/typeInferenceExpectedTypeMismatch.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package typeInferenceExpectedTypeMismatch
import java.util.*
diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt
index 9d3eda60264..f2609786760 100644
--- a/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt
+++ b/compiler/testData/diagnostics/tests/inference/upperBounds/doNotInferFromBoundsOnly.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
interface A
diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt
index 1d727a2feb2..cfd29b84229 100644
--- a/compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt
+++ b/compiler/testData/diagnostics/tests/inference/upperBounds/intersectUpperBounds.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
package s
diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsIfUnknownParameters.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsIfUnknownParameters.kt
index 2d823db0118..fb46c5cf4c5 100644
--- a/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsIfUnknownParameters.kt
+++ b/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsIfUnknownParameters.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package Hello
open class Base
diff --git a/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.kt b/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.kt
index efc30c8a7ac..89fc519d872 100644
--- a/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.kt
+++ b/compiler/testData/diagnostics/tests/inference/upperBounds/useBoundsToInferTypeParamsSimple.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
fun foo(v: V, u: U) = u
diff --git a/compiler/testData/diagnostics/tests/infos/SmartCasts.kt b/compiler/testData/diagnostics/tests/infos/SmartCasts.kt
index a0a6ff39863..e6836d19a4c 100644
--- a/compiler/testData/diagnostics/tests/infos/SmartCasts.kt
+++ b/compiler/testData/diagnostics/tests/infos/SmartCasts.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
open class A() {
fun foo() {}
}
diff --git a/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt b/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt
index 944a8f844c0..5b83f021a1d 100644
--- a/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt
+++ b/compiler/testData/diagnostics/tests/inline/inlineLambdaInDefaultInlineParameterDisabled.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE
// !LANGUAGE: -InlineDefaultFunctionalParameters
diff --git a/compiler/testData/diagnostics/tests/inline/kt15410.kt b/compiler/testData/diagnostics/tests/inline/kt15410.kt
index 82654d42606..1bfe158cd71 100644
--- a/compiler/testData/diagnostics/tests/inline/kt15410.kt
+++ b/compiler/testData/diagnostics/tests/inline/kt15410.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
open class Foo protected constructor()
diff --git a/compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.kt b/compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.kt
index bc142a7e12c..7e6ac061307 100644
--- a/compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.kt
+++ b/compiler/testData/diagnostics/tests/inner/qualifiedExpression/genericNestedClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Outer {
class Nested
}
diff --git a/compiler/testData/diagnostics/tests/j+k/collectorInference.kt b/compiler/testData/diagnostics/tests/j+k/collectorInference.kt
index 183f0c1519e..75e51dc97ec 100644
--- a/compiler/testData/diagnostics/tests/j+k/collectorInference.kt
+++ b/compiler/testData/diagnostics/tests/j+k/collectorInference.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// SKIP_TXT
// FULL_JDK
diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt
index 16f1b2a6df1..2688b25e95a 100644
--- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt
+++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/classTypeParameterInferredFromArgument.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// FILE: A.java
diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt
index 838f57a2b03..9acafd1215f 100644
--- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt
+++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/innerClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// FILE: Outer.java
diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.kt
index 700d2984b40..2cd18d7ac3a 100644
--- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.kt
+++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/noClassTypeParametersInvParameter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: A.java
public class A {
diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/recursive.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/recursive.kt
index 1be2ee95470..177a474f651 100644
--- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/recursive.kt
+++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/recursive.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: C.java
// See KT-10410
diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.kt
index 626599c15ee..5ef42c7edc7 100644
--- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.kt
+++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCall.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !CHECK_TYPE
// FILE: A.java
diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.kt
index c1b94c915aa..ee56a7763f7 100644
--- a/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.kt
+++ b/compiler/testData/diagnostics/tests/j+k/genericConstructor/superCallImpossibleToInfer.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !CHECK_TYPE
// FILE: A.java
diff --git a/compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.kt b/compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.kt
index 35919d7f608..0bbcf7c4093 100644
--- a/compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.kt
+++ b/compiler/testData/diagnostics/tests/j+k/genericConstructorWithMultipleBounds.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import java.io.Serializable;
diff --git a/compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.kt b/compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.kt
index 240e825292f..4ebb0fb6785 100644
--- a/compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.kt
+++ b/compiler/testData/diagnostics/tests/j+k/sam/enhancedSamConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import org.jetbrains.annotations.*;
diff --git a/compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.kt b/compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.kt
index 8912bdade0e..8b80c0f3d2c 100644
--- a/compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.kt
+++ b/compiler/testData/diagnostics/tests/j+k/samByProjectedType/genericInReturnType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// FILE: EventListener.java
public interface EventListener {
diff --git a/compiler/testData/diagnostics/tests/j+k/samByProjectedType/noAdapterBecuaseOfRecursiveUpperBound.kt b/compiler/testData/diagnostics/tests/j+k/samByProjectedType/noAdapterBecuaseOfRecursiveUpperBound.kt
index 8ae8eaaa41f..bb93cb2923a 100644
--- a/compiler/testData/diagnostics/tests/j+k/samByProjectedType/noAdapterBecuaseOfRecursiveUpperBound.kt
+++ b/compiler/testData/diagnostics/tests/j+k/samByProjectedType/noAdapterBecuaseOfRecursiveUpperBound.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// FILE: Function.java
public interface Function> {
diff --git a/compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.kt b/compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.kt
index bd1c004e9a9..280a4fa5a96 100644
--- a/compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.kt
+++ b/compiler/testData/diagnostics/tests/j+k/wrongVarianceInJava.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: A.java
diff --git a/compiler/testData/diagnostics/tests/kt13401.kt b/compiler/testData/diagnostics/tests/kt13401.kt
index d429c0366ab..b8aad251dbf 100644
--- a/compiler/testData/diagnostics/tests/kt13401.kt
+++ b/compiler/testData/diagnostics/tests/kt13401.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See KT-13401: SOE in VarianceChecker
interface Rec> {
fun t(): T
diff --git a/compiler/testData/diagnostics/tests/library/Collections.kt b/compiler/testData/diagnostics/tests/library/Collections.kt
index f3835f6a292..0cd0c7e695e 100644
--- a/compiler/testData/diagnostics/tests/library/Collections.kt
+++ b/compiler/testData/diagnostics/tests/library/Collections.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package collections
fun testCollection(c: Collection, t: T) {
diff --git a/compiler/testData/diagnostics/tests/modifiers/const/arrayInAnnotationArgumentType.kt b/compiler/testData/diagnostics/tests/modifiers/const/arrayInAnnotationArgumentType.kt
index 48c02bc6bf9..6df01f635f1 100644
--- a/compiler/testData/diagnostics/tests/modifiers/const/arrayInAnnotationArgumentType.kt
+++ b/compiler/testData/diagnostics/tests/modifiers/const/arrayInAnnotationArgumentType.kt
@@ -1,2 +1,3 @@
+// !WITH_NEW_INFERENCE
annotation class A(val a: IntArray = arrayOf(1))
annotation class B(val a: IntArray = intArrayOf(1))
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.kt b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.kt
index 58c21ffe96d..a26337acbaf 100644
--- a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.kt
+++ b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/LocalFunctions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class Example
diff --git a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.kt b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.kt
index 118c18e1137..e172d621d8c 100644
--- a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.kt
+++ b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/MemberFunctions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -EXTENSION_SHADOWED_BY_MEMBER
class Example {
diff --git a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.kt b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.kt
index b58a31a2e03..87bc587a34d 100644
--- a/compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.kt
+++ b/compiler/testData/diagnostics/tests/modifiers/operatorInfix/Simple.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -EXTENSION_SHADOWED_BY_MEMBER
open class Example {
diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameClassNameDifferentPackages.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameClassNameDifferentPackages.kt
index 1f2f734b1b4..bbbfcb18a17 100644
--- a/compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameClassNameDifferentPackages.kt
+++ b/compiler/testData/diagnostics/tests/multimodule/duplicateClass/sameClassNameDifferentPackages.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// MODULE: m1
// FILE: a.kt
diff --git a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt
index f7e2f091a53..1ef021675d6 100644
--- a/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt
+++ b/compiler/testData/diagnostics/tests/multimodule/duplicateMethod/classVsFunctionGenericsInParamsMismatch.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// MODULE: m1
// FILE: a.kt
package p
diff --git a/compiler/testData/diagnostics/tests/multiplatform/namedArguments.kt b/compiler/testData/diagnostics/tests/multiplatform/namedArguments.kt
index 3597f6dbd4e..de7447ec9ff 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/namedArguments.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/namedArguments.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +MultiPlatformProjects
// MODULE: m1-common
// FILE: common.kt
diff --git a/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callableReferenceOnExpectFun.kt b/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callableReferenceOnExpectFun.kt
index 0c22e4752ef..2c3ce8981b9 100644
--- a/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callableReferenceOnExpectFun.kt
+++ b/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/callableReferenceOnExpectFun.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +MultiPlatformProjects
// MODULE: m1-common
// FILE: common.kt
diff --git a/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt b/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt
index 8e681d78d2f..7ec20ec9c19 100644
--- a/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt
+++ b/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: test/J.java
package test;
diff --git a/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt b/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt
index f1c57739a06..5d9af118432 100644
--- a/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt
+++ b/compiler/testData/diagnostics/tests/namedArguments/disallowForSamAdapterFunction.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: test/J.java
package test;
diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.kt
index e95599614d2..898d9f2be47 100644
--- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.kt
+++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/AssertNotNull.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
fun main(args : Array) {
diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/InfixCallNullability.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/InfixCallNullability.kt
index 593f8024677..8762c3ab6f7 100644
--- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/InfixCallNullability.kt
+++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/InfixCallNullability.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A() {
operator infix fun plus(i : Int) {}
operator fun unaryMinus() {}
diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt
index d9a8a03c560..0dc64763155 100644
--- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt
+++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2164.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-2164 !! does not propagate nullability information
package kt2164
diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.kt
index 5d2bab62438..c26a3a8867e 100644
--- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.kt
+++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/kt2216.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
//KT-2216 Nullability of a value determined in function parameter computation doesn't pass to code following
package kt2216
diff --git a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unnecessaryNotNullAssertion.kt b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unnecessaryNotNullAssertion.kt
index 01c1b825896..a1e9a09a30d 100644
--- a/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unnecessaryNotNullAssertion.kt
+++ b/compiler/testData/diagnostics/tests/nullabilityAndSmartCasts/unnecessaryNotNullAssertion.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -SENSELESS_COMPARISON, -DEBUG_INFO_SMARTCAST
fun takeNotNull(s: String) {}
diff --git a/compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt b/compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt
index 4c5a76add3e..d8c27d1374f 100644
--- a/compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt
+++ b/compiler/testData/diagnostics/tests/nullableTypes/nullAssertOnTypeWithNullableUpperBound.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test(t: T): T {
if (t != null) {
return t!!
diff --git a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.kt b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.kt
index 33ded986920..bec2e0777e5 100644
--- a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.kt
+++ b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterPlatform.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import org.jetbrains.annotations.*;
diff --git a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.kt b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.kt
index b27e57887a3..764767b9c16 100644
--- a/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.kt
+++ b/compiler/testData/diagnostics/tests/nullableTypes/nullableArgumentToNonNullParameterSimple.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(x: String) {}
diff --git a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt
index b02ee4ec80d..73409b768d6 100644
--- a/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt
+++ b/compiler/testData/diagnostics/tests/nullableTypes/safeCallOnTypeWithNullableUpperBound.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test(t: T): String? {
if (t != null) {
return t?.toString()
diff --git a/compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt b/compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt
index 9c8f350401c..0db7fc9ee8b 100644
--- a/compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt
+++ b/compiler/testData/diagnostics/tests/nullableTypes/uselessElvis.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER, -SENSELESS_COMPARISON, -DEBUG_INFO_SMARTCAST
fun test1(t: Any?): Any {
diff --git a/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt b/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt
index ec7e0155f29..d20648a9cce 100644
--- a/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt
+++ b/compiler/testData/diagnostics/tests/numbers/characterIsNotANumber.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(n: Number) = n
fun test() {
diff --git a/compiler/testData/diagnostics/tests/numbers/doublesInSimpleConstraints.kt b/compiler/testData/diagnostics/tests/numbers/doublesInSimpleConstraints.kt
index 6aae023b514..400dacdc811 100644
--- a/compiler/testData/diagnostics/tests/numbers/doublesInSimpleConstraints.kt
+++ b/compiler/testData/diagnostics/tests/numbers/doublesInSimpleConstraints.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
package a
diff --git a/compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt b/compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt
index bc1489c8f0b..e0041f7e27b 100644
--- a/compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt
+++ b/compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
fun foo(i: Int) = i
diff --git a/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt b/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt
index 6f9c3a2b0f5..852853e8715 100644
--- a/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt
+++ b/compiler/testData/diagnostics/tests/numbers/numbersInSimpleConstraints.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
package a
diff --git a/compiler/testData/diagnostics/tests/objects/kt5527.kt b/compiler/testData/diagnostics/tests/objects/kt5527.kt
index 6b5ba7195b6..0a8853e73f2 100644
--- a/compiler/testData/diagnostics/tests/objects/kt5527.kt
+++ b/compiler/testData/diagnostics/tests/objects/kt5527.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
object Boo {}
diff --git a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt
index 5f3181b7cb5..52b922f5483 100644
--- a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt
+++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModAssignOperatorConventions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class OldAndNew {
diff --git a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt
index 7da4051e628..5d82830f2f8 100644
--- a/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt
+++ b/compiler/testData/diagnostics/tests/operatorRem/DeprecatedModOperatorConventions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class OldAndNew {
diff --git a/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt
index 2699a872e43..c15b65b2f9d 100644
--- a/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt
+++ b/compiler/testData/diagnostics/tests/operatorRem/doNotResolveToInapplicableRem.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
object OldMod {
diff --git a/compiler/testData/diagnostics/tests/operatorRem/noWarningForModFromBuiltinsWhenApi1_0.kt b/compiler/testData/diagnostics/tests/operatorRem/noWarningForModFromBuiltinsWhenApi1_0.kt
index 1542cf69f83..43e062bd32d 100644
--- a/compiler/testData/diagnostics/tests/operatorRem/noWarningForModFromBuiltinsWhenApi1_0.kt
+++ b/compiler/testData/diagnostics/tests/operatorRem/noWarningForModFromBuiltinsWhenApi1_0.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !API_VERSION: 1.0
// !DIAGNOSTICS: -UNUSED_PARAMETER, -UNUSED_VARIABLE, -EXTENSION_SHADOWED_BY_MEMBER
diff --git a/compiler/testData/diagnostics/tests/operatorsOverloading/kt13330.kt b/compiler/testData/diagnostics/tests/operatorsOverloading/kt13330.kt
index d41763b36b7..dc57494539c 100644
--- a/compiler/testData/diagnostics/tests/operatorsOverloading/kt13330.kt
+++ b/compiler/testData/diagnostics/tests/operatorsOverloading/kt13330.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-13330 AssertionError: Illegal resolved call to variable with invoke
fun foo(exec: (String.() -> Unit)?) = "".exec<caret>() // is test data tag here
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/overload/defaultParameters.kt b/compiler/testData/diagnostics/tests/overload/defaultParameters.kt
index d1829c687f1..abc3d7231bc 100644
--- a/compiler/testData/diagnostics/tests/overload/defaultParameters.kt
+++ b/compiler/testData/diagnostics/tests/overload/defaultParameters.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
diff --git a/compiler/testData/diagnostics/tests/overload/kt2493.kt b/compiler/testData/diagnostics/tests/overload/kt2493.kt
index d3c35d046d3..187278e22bd 100644
--- a/compiler/testData/diagnostics/tests/overload/kt2493.kt
+++ b/compiler/testData/diagnostics/tests/overload/kt2493.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface A
interface B
diff --git a/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt b/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt
index 5c1541699c6..de6e0d75a39 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/commonSupertype/withNothing.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// !CHECK_TYPE
// JAVAC_SKIP
diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt b/compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt
index 3258b755a55..c395d100d1c 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/methodCall/singleton.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
interface Foo
diff --git a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.kt b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.kt
index 4733007abc5..fc5798e3cea 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/notNullTypeParameter/methodTypeParameter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: A.java
import org.jetbrains.annotations.NotNull;
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.kt
index 8f9b3ca4031..f48c9f24eed 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/arithmetic.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import org.jetbrains.annotations.*;
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/assignToVar.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/assignToVar.kt
index 712431e8132..bcc125ee286 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/assignToVar.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/assignToVar.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import org.jetbrains.annotations.*;
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/conditions.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/conditions.kt
index 551d125f87d..cda8720e916 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/conditions.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/conditions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION
// FILE: J.java
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.kt
index bb8ff0a9c87..8af77c1813a 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/dataFlowInfo.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: J.java
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/defaultParameters.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/defaultParameters.kt
index 4c6d2fc62aa..6d74135a4b6 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/defaultParameters.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/defaultParameters.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// FILE: J.java
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.kt
index 5970a02c277..6b878d86363 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import org.jetbrains.annotations.*;
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/invoke.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/invoke.kt
index a1c251fae35..618110170a7 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/invoke.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/invoke.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import org.jetbrains.annotations.*;
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt
index 33465a257df..c2367edb4df 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/passToJava.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import org.jetbrains.annotations.*;
diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt
index df4f6c14145..87f626a5219 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/throw.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: J.java
import org.jetbrains.annotations.*;
diff --git a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt
index 5cf858c70fc..0aef2d571dc 100644
--- a/compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt
+++ b/compiler/testData/diagnostics/tests/platformTypes/rawTypes/arrays.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// FILE: A.java
diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/cantBeInferred.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/cantBeInferred.kt
index 804ac350ff3..bb579888fe8 100644
--- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/cantBeInferred.kt
+++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/cantBeInferred.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val x get() = foo()
val y get() = bar()
diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt
index c9c42e8cf62..c8bd54ea24f 100644
--- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt
+++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/nullAsNothing.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
val x get() = null
val y get() = null!!
diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.kt
index b34a14da86c..bd0b42a0fec 100644
--- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.kt
+++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/objectExpression.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
object Outer {
private var x
diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.kt
index e0887524739..c5c6ebc76fb 100644
--- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.kt
+++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/recursiveGetter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
val x get() = x
diff --git a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt
index 9fb6776fbeb..3ceb84e4e03 100644
--- a/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt
+++ b/compiler/testData/diagnostics/tests/properties/inferenceFromGetters/unsupportedInferenceFromGetters.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: -ShortSyntaxForPropertyGetters
// blockBodyGetter.kt
diff --git a/compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt b/compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt
index f7f0bc31ac3..31bea1ed20a 100644
--- a/compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt
+++ b/compiler/testData/diagnostics/tests/qualifiedExpression/calleeExpressionAsCallExpression.kt
@@ -1 +1,2 @@
+// !WITH_NEW_INFERENCE
val unwrapped = some<sdf()()Any>::unwrap
\ No newline at end of file
diff --git a/compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt b/compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt
index 2228fae7f4c..0d9a2300de3 100644
--- a/compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt
+++ b/compiler/testData/diagnostics/tests/recovery/absentLeftHandSide.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun import() {
import a.*
}
diff --git a/compiler/testData/diagnostics/tests/regressions/Jet81.kt b/compiler/testData/diagnostics/tests/regressions/Jet81.kt
index 7471dd22f7a..937280e5047 100644
--- a/compiler/testData/diagnostics/tests/regressions/Jet81.kt
+++ b/compiler/testData/diagnostics/tests/regressions/Jet81.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// JET-81 Assertion fails when processing self-referring anonymous objects
class Test {
diff --git a/compiler/testData/diagnostics/tests/regressions/OutProjections.kt b/compiler/testData/diagnostics/tests/regressions/OutProjections.kt
index 26bbe985f82..39efd74e639 100644
--- a/compiler/testData/diagnostics/tests/regressions/OutProjections.kt
+++ b/compiler/testData/diagnostics/tests/regressions/OutProjections.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Point() {
}
diff --git a/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt b/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt
index 82475c40971..a9b122a049b 100644
--- a/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt
+++ b/compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun main(args : Array) {
val a : Int? = null;
var v = 1
diff --git a/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.kt b/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.kt
index 115caf5bcf6..c66f2d28002 100644
--- a/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.kt
+++ b/compiler/testData/diagnostics/tests/regressions/correctResultSubstitutorForErrorCandidate.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun test(a: Int, b: Boolean) {
diff --git a/compiler/testData/diagnostics/tests/regressions/ea72837.kt b/compiler/testData/diagnostics/tests/regressions/ea72837.kt
index f424abf6add..1c2ff7dd647 100644
--- a/compiler/testData/diagnostics/tests/regressions/ea72837.kt
+++ b/compiler/testData/diagnostics/tests/regressions/ea72837.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun g(x: T) = 1
fun h(x: () -> Unit) = 1
diff --git a/compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundLocal.kt b/compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundLocal.kt
index 63ff6933834..9fd1623003c 100644
--- a/compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundLocal.kt
+++ b/compiler/testData/diagnostics/tests/regressions/itselfAsUpperBoundLocal.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun bar() {
fun <T: T?> foo() {}
foo()
diff --git a/compiler/testData/diagnostics/tests/regressions/kt10243.kt b/compiler/testData/diagnostics/tests/regressions/kt10243.kt
index fd5c9d63067..6ab2a6061de 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt10243.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt10243.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val f: Boolean = true
private fun doUpdateRegularTasks() {
try {
diff --git a/compiler/testData/diagnostics/tests/regressions/kt10843.kt b/compiler/testData/diagnostics/tests/regressions/kt10843.kt
index 9467ab4c6d9..d4d1cd35329 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt10843.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt10843.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See EA-76890 / KT-10843: NPE during analysis
fun lambda(x : Int?) = x?.let l {
y ->
diff --git a/compiler/testData/diagnostics/tests/regressions/kt13685.kt b/compiler/testData/diagnostics/tests/regressions/kt13685.kt
index 19b3b9a51cc..3e161815ad4 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt13685.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt13685.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNREACHABLE_CODE
fun foo() {
diff --git a/compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt b/compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt
index 87309b1c892..9a69afe4825 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt1489_1728.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package kt606_dependents
//KT-1489 Code analyzer fails with assertion
diff --git a/compiler/testData/diagnostics/tests/regressions/kt251.kt b/compiler/testData/diagnostics/tests/regressions/kt251.kt
index fdfb36382b3..b52bd7e1792 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt251.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt251.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A() {
var x: Int = 0
get() = "s"
diff --git a/compiler/testData/diagnostics/tests/regressions/kt282.kt b/compiler/testData/diagnostics/tests/regressions/kt282.kt
index 014273d384e..add5982d012 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt282.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt282.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-282 Nullability in extension functions and in binary calls
class Set {
diff --git a/compiler/testData/diagnostics/tests/regressions/kt312.kt b/compiler/testData/diagnostics/tests/regressions/kt312.kt
index ca5329d02c2..7bf636b1c7f 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt312.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt312.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-312 Nullability problem when a nullable version of a generic type is returned
fun Array.safeGet(index : Int) : T? {
diff --git a/compiler/testData/diagnostics/tests/regressions/kt328.kt b/compiler/testData/diagnostics/tests/regressions/kt328.kt
index 818b2bafefa..48cb0eb0fe4 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt328.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt328.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-328 Local function in function literals cause exceptions
fun bar1() = {
diff --git a/compiler/testData/diagnostics/tests/regressions/kt352.kt b/compiler/testData/diagnostics/tests/regressions/kt352.kt
index f876e633d2d..5bd249c75ea 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt352.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt352.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//KT-352 Function variable declaration type isn't checked inside a function body
package kt352
diff --git a/compiler/testData/diagnostics/tests/regressions/kt353.kt b/compiler/testData/diagnostics/tests/regressions/kt353.kt
index 2ca5f2a2e29..3eaa1217404 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt353.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt353.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-353 Generic type argument inference sometimes doesn't work
interface A {
diff --git a/compiler/testData/diagnostics/tests/regressions/kt5362.kt b/compiler/testData/diagnostics/tests/regressions/kt5362.kt
index 01590fb2bfe..34fbca34c61 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt5362.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt5362.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-5362 Compiler crashes on access to extension method from nested class
class Outer {
class Nested{
diff --git a/compiler/testData/diagnostics/tests/regressions/kt557.kt b/compiler/testData/diagnostics/tests/regressions/kt557.kt
index bd964a524ff..ca81985dbb2 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt557.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt557.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-557 Wrong type inference near sure extension function
fun T?.sure() : T = this!!
diff --git a/compiler/testData/diagnostics/tests/regressions/kt7804.kt b/compiler/testData/diagnostics/tests/regressions/kt7804.kt
index 4f2a17dfefb..272a5ff8555 100644
--- a/compiler/testData/diagnostics/tests/regressions/kt7804.kt
+++ b/compiler/testData/diagnostics/tests/regressions/kt7804.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See also KT-7804 (Wrong type inference of kotlin.Any? was for 'a' without explicit type)
fun foo(a: T) = a
diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt
index 1fb93f4ea9f..7a86989c69d 100644
--- a/compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt
+++ b/compiler/testData/diagnostics/tests/resolve/dslMarker/dslMarkerWithTypealiasRecursion.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
@DslMarker
@Target(AnnotationTarget.CLASS, AnnotationTarget.TYPEALIAS)
annotation class XMarker
diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/markersIntersection.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/markersIntersection.kt
index 4e5850e0a7c..775a0300d13 100644
--- a/compiler/testData/diagnostics/tests/resolve/dslMarker/markersIntersection.kt
+++ b/compiler/testData/diagnostics/tests/resolve/dslMarker/markersIntersection.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
@DslMarker
@Target(AnnotationTarget.TYPE)
diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedType.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedType.kt
index bdd29eee30e..d65adb64d78 100644
--- a/compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedType.kt
+++ b/compiler/testData/diagnostics/tests/resolve/dslMarker/substitutedReceiverAnnotatedType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
@DslMarker
@Target(AnnotationTarget.TYPE)
diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt
index 122453a16c1..beadda68213 100644
--- a/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt
+++ b/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
@DslMarker
@Target(AnnotationTarget.TYPE)
diff --git a/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt b/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt
index bd0ded665ff..6aae057bbae 100644
--- a/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt
+++ b/compiler/testData/diagnostics/tests/resolve/dslMarker/threeImplicitReceivers2.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
@DslMarker
@Target(AnnotationTarget.TYPE)
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.kt b/compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.kt
index 9addabddf66..5ed3ec12220 100644
--- a/compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.kt
+++ b/compiler/testData/diagnostics/tests/resolve/invoke/errors/typeInferenceErrorForInvoke.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt b/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt
index 3ddec244424..895b56c673b 100644
--- a/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt
+++ b/compiler/testData/diagnostics/tests/resolve/invoke/errors/wrongReceiverTypeForInvoke.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun String.invoke(i: Int) {}
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/extensionValueAsNonExtension.kt b/compiler/testData/diagnostics/tests/resolve/invoke/extensionValueAsNonExtension.kt
index bc6110d5d4e..e3022a16f8b 100644
--- a/compiler/testData/diagnostics/tests/resolve/invoke/extensionValueAsNonExtension.kt
+++ b/compiler/testData/diagnostics/tests/resolve/invoke/extensionValueAsNonExtension.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
class A
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt b/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt
index 2b4de189a43..8dca44daf4a 100644
--- a/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt
+++ b/compiler/testData/diagnostics/tests/resolve/invoke/functionExpectedWhenSeveralInvokesExist.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun Int.invoke(a: Int) {}
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.kt
index 619c7f51c2a..12dc450e4da 100644
--- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.kt
+++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeAndSmartCast.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A(val x: (String.() -> Unit)?)
fun test(a: A) {
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt b/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt
index 638e4bf4909..2d80c60b1a8 100644
--- a/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt
+++ b/compiler/testData/diagnostics/tests/resolve/invoke/invokeOnVariableWithExtensionFunctionType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: 1.kt
package fooIsExtension
diff --git a/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt b/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt
index 1a602f09cc3..f82a458249a 100644
--- a/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt
+++ b/compiler/testData/diagnostics/tests/resolve/invoke/reportFunctionExpectedWhenOneInvokeExist.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun Int.invoke() {}
diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/completeTypeInferenceForNestedInNoneApplicable.kt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/completeTypeInferenceForNestedInNoneApplicable.kt
index 6fc9e121638..42114fea648 100644
--- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/completeTypeInferenceForNestedInNoneApplicable.kt
+++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/completeTypeInferenceForNestedInNoneApplicable.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package h
fun foo(i: Int) = i
diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.kt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.kt
index d04bdf6472d..5b70468acfd 100644
--- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.kt
+++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/manyInapplicableCandidatesWithLambdas.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A
diff --git a/compiler/testData/diagnostics/tests/resolve/nestedCalls/twoTypeParameters.kt b/compiler/testData/diagnostics/tests/resolve/nestedCalls/twoTypeParameters.kt
index a6a4d5c7626..1ebd4fa0c25 100644
--- a/compiler/testData/diagnostics/tests/resolve/nestedCalls/twoTypeParameters.kt
+++ b/compiler/testData/diagnostics/tests/resolve/nestedCalls/twoTypeParameters.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class ResolutionCandidate
class ResolutionTask(val candidate: ResolutionCandidate)
diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt
index 0c6b7c71471..c59482f10f7 100644
--- a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt
+++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/allLambdas.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
object X1
diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10640.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10640.kt
index 50b30912c56..cbd845273c0 100644
--- a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10640.kt
+++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/kt10640.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface AutoCloseable
interface Closeable : AutoCloseable
diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/originalExamples.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/originalExamples.kt
index 3f4980a13c6..1123643b69f 100644
--- a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/originalExamples.kt
+++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/originalExamples.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
object Right
diff --git a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/withVariance.kt b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/withVariance.kt
index 55475c1f810..77213c68ae3 100644
--- a/compiler/testData/diagnostics/tests/resolve/overloadConflicts/withVariance.kt
+++ b/compiler/testData/diagnostics/tests/resolve/overloadConflicts/withVariance.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
object X1
object X2
diff --git a/compiler/testData/diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt b/compiler/testData/diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt
index faed3c66d29..67b4400b312 100644
--- a/compiler/testData/diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt
+++ b/compiler/testData/diagnostics/tests/resolve/resolveWithSpecifiedFunctionLiteralWithId.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
//If this test hangs, it means something is broken.
package a
diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.kt
index c6655a46a5b..66703cb4ff9 100644
--- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.kt
+++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/constantsInIf.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -USELESS_ELVIS
fun test() {
diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt
index 77d1650f60d..0b288e5f2c0 100644
--- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt
+++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/elvisAsCall.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
interface A
diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt
index 148cdc00581..c6e14c82b14 100644
--- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt
+++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/exclExclAsCall.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package a
interface A
diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt
index 7433a8cdb7c..d932b83ea9a 100644
--- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt
+++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/multipleSuperClasses.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
interface A
diff --git a/compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.kt b/compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.kt
index f916115aed2..e06430e2cdc 100644
--- a/compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.kt
+++ b/compiler/testData/diagnostics/tests/resolve/specialConstructions/reportTypeMismatchDeeplyOnBranches.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package b
fun bar(i: Int) = i
diff --git a/compiler/testData/diagnostics/tests/resolve/wrongNumberOfTypeArguments.kt b/compiler/testData/diagnostics/tests/resolve/wrongNumberOfTypeArguments.kt
index b41383e9f25..64f0008c26a 100644
--- a/compiler/testData/diagnostics/tests/resolve/wrongNumberOfTypeArguments.kt
+++ b/compiler/testData/diagnostics/tests/resolve/wrongNumberOfTypeArguments.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(t: T) = t
diff --git a/compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt b/compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt
index 3207307bb62..29afef1bca2 100644
--- a/compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt
+++ b/compiler/testData/diagnostics/tests/resolve/wrongReceiver.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package some
class A()
diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.kt
index e5638ff3996..e969432d437 100644
--- a/compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.kt
+++ b/compiler/testData/diagnostics/tests/scopes/inheritance/methodsPriority.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// FILE: A.java
public class A {
diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass.kt
index f16b5fef490..4653123d7d5 100644
--- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass.kt
+++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/companionObject/inheritFromContainingClass.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// FILE: J.java
diff --git a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/localVsStatic.kt b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/localVsStatic.kt
index b4be8f60f25..912bd91a5c3 100644
--- a/compiler/testData/diagnostics/tests/scopes/inheritance/statics/localVsStatic.kt
+++ b/compiler/testData/diagnostics/tests/scopes/inheritance/statics/localVsStatic.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE
// FILE: A.java
public class A {
diff --git a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructor.kt b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructor.kt
index 65fb3936ae6..f467938fb1b 100644
--- a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructor.kt
+++ b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/nonSuperCallConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
open class A protected constructor(x: Int) {
diff --git a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.kt b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.kt
index c277886838f..5daaf0e74c0 100644
--- a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.kt
+++ b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/syntheticSAMExtensions.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: abc/A.java
package abc;
public class A {
diff --git a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt
index 2617fc06257..108dacf6574 100644
--- a/compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt
+++ b/compiler/testData/diagnostics/tests/scopes/protectedVisibility/unstableSmartCast.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
open class BaseOuter {
protected fun foo() = 1
diff --git a/compiler/testData/diagnostics/tests/script/NestedInnerClass.kts b/compiler/testData/diagnostics/tests/script/NestedInnerClass.kts
index 4628d4c9fb6..1fbc2860e60 100644
--- a/compiler/testData/diagnostics/tests/script/NestedInnerClass.kts
+++ b/compiler/testData/diagnostics/tests/script/NestedInnerClass.kts
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// documents inconsistency between scripts and classes, see DeclarationScopeProviderImpl
fun function() = 42
diff --git a/compiler/testData/diagnostics/tests/script/destructuringDeclarationsScript.kts b/compiler/testData/diagnostics/tests/script/destructuringDeclarationsScript.kts
index 21595c19e53..7852cf28d9f 100644
--- a/compiler/testData/diagnostics/tests/script/destructuringDeclarationsScript.kts
+++ b/compiler/testData/diagnostics/tests/script/destructuringDeclarationsScript.kts
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val (a1, a2) = A()
val (b1: Int, b2: Int) = A()
val (c1) = unresolved
diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.kt
index 0237b353ad3..97f775ce8e0 100644
--- a/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.kt
+++ b/compiler/testData/diagnostics/tests/secondaryConstructors/constructorCallType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A(x: Int) {
constructor(x: Double): this(1)
diff --git a/compiler/testData/diagnostics/tests/secondaryConstructors/return.kt b/compiler/testData/diagnostics/tests/secondaryConstructors/return.kt
index e176b17792d..28315408a5a 100644
--- a/compiler/testData/diagnostics/tests/secondaryConstructors/return.kt
+++ b/compiler/testData/diagnostics/tests/secondaryConstructors/return.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A {
init {
return
diff --git a/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.kt b/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.kt
index fb54d78d676..5dadcfa3f0e 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/alwaysNull.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(): String {
var s: String?
s = null
diff --git a/compiler/testData/diagnostics/tests/smartCasts/alwaysNullWithJava.kt b/compiler/testData/diagnostics/tests/smartCasts/alwaysNullWithJava.kt
index 87c201d66a7..66baa59bc9a 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/alwaysNullWithJava.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/alwaysNullWithJava.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: My.java
public class My {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.kt b/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.kt
index e32e20e58e0..108a81448bd 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/castchecks/variables.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +SafeCastCheckBoundSmartCasts
interface SomeClass {
val data: Any?
diff --git a/compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.kt b/compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.kt
index c7a783c10d5..898112f73fd 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/comparisonUnderAnd.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(x : String?, y : String?) {
if (y != null && x == y) {
// Both not null
diff --git a/compiler/testData/diagnostics/tests/smartCasts/complexComparison.kt b/compiler/testData/diagnostics/tests/smartCasts/complexComparison.kt
index 55047be2c31..7ce7ba82a27 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/complexComparison.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/complexComparison.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(x: String?, y: String?, z: String?, w: String?) {
if (x != null && y != null && (x == z || y == z))
z.length
diff --git a/compiler/testData/diagnostics/tests/smartCasts/elvis/impossible.kt b/compiler/testData/diagnostics/tests/smartCasts/elvis/impossible.kt
index bc513943e93..8b9c7882a69 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/elvis/impossible.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/elvis/impossible.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +BooleanElvisBoundSmartCasts
// See KT-20752
diff --git a/compiler/testData/diagnostics/tests/smartCasts/elvisExprNotNull.kt b/compiler/testData/diagnostics/tests/smartCasts/elvisExprNotNull.kt
index 3c6ccd65658..64769d9391d 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/elvisExprNotNull.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/elvisExprNotNull.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(s: Any?): String {
val t = when {
// To resolve: String U Nothing? = String?
diff --git a/compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt b/compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt
index 82fc66eb9e4..30710c6791b 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/explicitDefaultGetter.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class ExplicitAccessorForAnnotation {
val tt: String? = "good"
get
diff --git a/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt b/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt
index 39a207bd979..fb3fc148bc5 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/inference/intersectionTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
package a
diff --git a/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt b/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt
index cf2be42b3c9..60734d28f6c 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/flexibleTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
// FILE: A.java
public interface A {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.kt b/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.kt
index e8db585a64d..ac1fb2d44fb 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/intersectionScope/unstableSmartCast.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
interface A {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/kt10444.kt b/compiler/testData/diagnostics/tests/smartCasts/kt10444.kt
index 5838a0b26af..1883272fde6 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/kt10444.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/kt10444.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
// KT-10444 Do not ignore smart (unchecked) casts to the same classifier
diff --git a/compiler/testData/diagnostics/tests/smartCasts/kt2865.kt b/compiler/testData/diagnostics/tests/smartCasts/kt2865.kt
index 64ef73cfc3f..646abce4250 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/kt2865.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/kt2865.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
operator fun MutableMap.set(k: K, v: V) {}
fun foo(a: MutableMap, x: String?) {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.kt b/compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.kt
index f8e82cdd3f0..9dd41f2916f 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/lambdaArgumentWithBoundWithoutType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface Foo
interface Bar : Foo
diff --git a/compiler/testData/diagnostics/tests/smartCasts/localFunChanges.kt b/compiler/testData/diagnostics/tests/smartCasts/localFunChanges.kt
index 75054ca9765..7066f3ae02a 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/localFunChanges.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/localFunChanges.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun trans(n: Int, f: () -> Boolean) = if (f()) n else null
fun foo() {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/objectLiterals/captured.kt b/compiler/testData/diagnostics/tests/smartCasts/objectLiterals/captured.kt
index d9756feaa31..65f82d25d30 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/objectLiterals/captured.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/objectLiterals/captured.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
abstract class Runnable {
abstract fun run()
}
diff --git a/compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexcl.kt b/compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexcl.kt
index 7cd2a3f5ae9..0ab702ecc3d 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexcl.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/objectLiterals/exclexcl.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
abstract class Runnable {
abstract fun run()
}
diff --git a/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt b/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt
index 9a0d88c99b4..bad04d13679 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/propertyAsCondition.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See also: KT-11998
data class My(val x: Boolean?)
diff --git a/compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.kt b/compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.kt
index ea7b2718112..412d720a42b 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/propertyToNotNull.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Immutable(val x: String?) {
fun foo(): String {
if (x != null) return x
diff --git a/compiler/testData/diagnostics/tests/smartCasts/publicVals/delegate.kt b/compiler/testData/diagnostics/tests/smartCasts/publicVals/delegate.kt
index c7a0cc99951..db465a5178c 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/publicVals/delegate.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/publicVals/delegate.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
import kotlin.reflect.KProperty
class Delegate {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt
index 9186bd29de6..b8618e95a6d 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/safecalls/safeAccessReceiverNotNull.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: -SafeCastCheckBoundSmartCasts -BooleanElvisBoundSmartCasts
// A set of examples for
// "If the result of a safe call is not null, understand that its receiver is not null"
diff --git a/compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt b/compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt
index 0d6d059b265..eefbcaff5b2 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/typeInComparison.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(): Int {
val x: Any? = null
val y = 2
diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/ifNullAssignment.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/ifNullAssignment.kt
index 831454ca2e1..91080e6588b 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/variables/ifNullAssignment.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/variables/ifNullAssignment.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See KT-13468, KT-13765
fun basic(): String {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.kt
index e47510d2f79..232dfcea0f7 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/variables/lambdaBetweenArguments.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(x: Int, f: () -> Unit, y: Int) {}
diff --git a/compiler/testData/diagnostics/tests/smartCasts/variables/property.kt b/compiler/testData/diagnostics/tests/smartCasts/variables/property.kt
index 18fb6da5faa..9080cf27252 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/variables/property.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/variables/property.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class MyClass(var p: String?)
fun bar(s: String): Int {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt
index 2b04c9dbd6a..ea604ac8c77 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/assignment.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo() {
var v: String? = null
v.length
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.kt
index 90324b99e7c..1044e2a6284 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/boundInitializerWrong.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// KT-15792 and related
fun foo() {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEach.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEach.kt
index 99460ce9520..3506cfcb632 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEach.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEach.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
data class SomeObject(val n: SomeObject?) {
fun doSomething() {}
fun next(): SomeObject? = n
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithBreak.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithBreak.kt
index 89510103255..7516bcd91d0 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithBreak.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithBreak.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
data class SomeObject(val n: SomeObject?) {
fun doSomething() {}
fun next(): SomeObject? = n
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithContinue.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithContinue.kt
index 540dc379650..2a779baae76 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithContinue.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/forEachWithContinue.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
data class SomeObject(val n: SomeObject?) {
fun doSomething() {}
fun next(): SomeObject? = n
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initInTryReturnInCatch.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initInTryReturnInCatch.kt
index fd10410c755..c8ba0990825 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initInTryReturnInCatch.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initInTryReturnInCatch.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// JAVAC_EXPECTED_FILE
// See also KT-10735
fun test() {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt
index af06829a8ce..443bd059730 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/initialization.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo() {
var v: String? = "xyz"
// It is possible in principle to provide smart cast here
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt
index b68a453dfad..619cc29f317 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/plusplusMinusminus.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(arg: Int?): Int {
var i = arg
if (i != null && i++ == 5) {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNotnullClassIncrement.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNotnullClassIncrement.kt
index a06b9936a6e..405fe148ede 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNotnullClassIncrement.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/postfixNotnullClassIncrement.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class MyClass
operator fun MyClass.inc(): MyClass { return null!! }
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNotnullClassIncrement.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNotnullClassIncrement.kt
index 8608bce843e..5424ddfdaa2 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNotnullClassIncrement.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/prefixNotnullClassIncrement.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class MyClass
operator fun MyClass.inc(): MyClass { return null!! }
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt
index e58eeca864d..a369192dfa1 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/unnecessaryWithMap.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun create(): Map = null!!
operator fun Map.iterator(): Iterator> = null!!
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInInlineClosure.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInInlineClosure.kt
index 4690ee9d570..11f1854c6b1 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInInlineClosure.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varCapturedInInlineClosure.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// See also KT-7186
fun IntArray.forEachIndexed( op: (i: Int, value: Int) -> Unit) {
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.kt
index 0675e3e7288..073d5bbd11f 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varIntNull.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(): Int {
var i: Int? = 42
i = null
diff --git a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNull.kt b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNull.kt
index 5c474c5f348..906f46ba00b 100644
--- a/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNull.kt
+++ b/compiler/testData/diagnostics/tests/smartCasts/varnotnull/varNull.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(): Int {
var s: String? = "abc"
s = null
diff --git a/compiler/testData/diagnostics/tests/substitutions/starProjections.kt b/compiler/testData/diagnostics/tests/substitutions/starProjections.kt
index 784f5cf8eb8..221ac2a366a 100644
--- a/compiler/testData/diagnostics/tests/substitutions/starProjections.kt
+++ b/compiler/testData/diagnostics/tests/substitutions/starProjections.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !CHECK_TYPE
interface A> {
diff --git a/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt b/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt
index 75177c4da02..5444e9faafa 100644
--- a/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt
+++ b/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithAmbiguity.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: foo.kt
package foo
diff --git a/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt b/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt
index c11f367f9d7..8e10b398ca2 100644
--- a/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt
+++ b/compiler/testData/diagnostics/tests/substitutions/upperBoundsSubstitutionForOverloadResolutionWithErrorTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -CONFLICTING_JVM_DECLARATIONS -UNUSED_PARAMETER
fun f1(l: List1): T {throw Exception()} // ERROR type here
fun f1(l: List2): T {throw Exception()} // ERROR type here
diff --git a/compiler/testData/diagnostics/tests/subtyping/localClasses.kt b/compiler/testData/diagnostics/tests/subtyping/localClasses.kt
index c26c039cf5e..8f116ad0686 100644
--- a/compiler/testData/diagnostics/tests/subtyping/localClasses.kt
+++ b/compiler/testData/diagnostics/tests/subtyping/localClasses.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER
package p
diff --git a/compiler/testData/diagnostics/tests/subtyping/nestedIntoLocalClasses.kt b/compiler/testData/diagnostics/tests/subtyping/nestedIntoLocalClasses.kt
index 8c120f25fa6..53d549c771c 100644
--- a/compiler/testData/diagnostics/tests/subtyping/nestedIntoLocalClasses.kt
+++ b/compiler/testData/diagnostics/tests/subtyping/nestedIntoLocalClasses.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER
package p
diff --git a/compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt b/compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt
index 96f77f0a5c0..ec238c908a8 100644
--- a/compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt
+++ b/compiler/testData/diagnostics/tests/subtyping/nestedLocalClasses.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER
package p
diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.kt
index 9a58bd55427..01e4d1a162e 100644
--- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.kt
+++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/InnerClassInGeneric.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: KotlinFile.kt
fun foo(javaClass: JavaClass): Int {
val inner = javaClass.createInner()
diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/NoNamedArgsAllowed.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/NoNamedArgsAllowed.kt
index 226048d24ea..c0f3ecee47e 100644
--- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/NoNamedArgsAllowed.kt
+++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/NoNamedArgsAllowed.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: KotlinFile.kt
fun foo(javaClass: JavaClass) {
javaClass.doSomething(p = 1) {
diff --git a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.kt b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.kt
index 196fa9da4e7..1bfca31f3ea 100644
--- a/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.kt
+++ b/compiler/testData/diagnostics/tests/syntheticExtensions/samAdapters/ParameterTypeAnnotation.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// FILE: KotlinFile.kt
fun foo(javaInterface: JavaInterface) {
javaInterface.doIt(null) { }
diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt
index 0403356226c..b8ba8255065 100644
--- a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt
+++ b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/ambiguousSuperWithGenerics.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
open class GenericBaseClass {
open fun foo(x: T): T = x
open fun ambiguous(x: T): T = x
diff --git a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt
index 395986d1a41..402593c0a80 100644
--- a/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt
+++ b/compiler/testData/diagnostics/tests/thisAndSuper/unqualifiedSuper/unqualifiedSuperWithCallableProperty.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// Ambiguity between fun and callable property
open class BaseWithCallableProp {
diff --git a/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.kt b/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.kt
index 0c8f9522de4..11c6c3327a2 100644
--- a/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.kt
+++ b/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Num(val x: T)
typealias N = Num
diff --git a/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt b/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt
index ad38c5b85db..fcf532a4be2 100644
--- a/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt
+++ b/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
class TColl>
diff --git a/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt b/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt
index bff8d000d1d..6d59d441282 100644
--- a/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt
+++ b/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
class Num
diff --git a/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt b/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt
index 4aea2e00941..d4ad9f8f2cb 100644
--- a/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt
+++ b/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Outer {
inner class Inner
}
diff --git a/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructorInSupertypes.kt b/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructorInSupertypes.kt
index 39464555cfd..5cd116cba47 100644
--- a/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructorInSupertypes.kt
+++ b/compiler/testData/diagnostics/tests/typealias/innerClassTypeAliasConstructorInSupertypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
package test
typealias OI = Outer.Inner
diff --git a/compiler/testData/diagnostics/tests/typealias/innerTypeAliasConstructor.kt b/compiler/testData/diagnostics/tests/typealias/innerTypeAliasConstructor.kt
index f870fa0a89b..c3054933319 100644
--- a/compiler/testData/diagnostics/tests/typealias/innerTypeAliasConstructor.kt
+++ b/compiler/testData/diagnostics/tests/typealias/innerTypeAliasConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -TOPLEVEL_TYPEALIASES_ONLY
class Pair(val x: X, val y: Y)
diff --git a/compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.kt b/compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.kt
index f74cd8ba8fc..a410e19d1bb 100644
--- a/compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.kt
+++ b/compiler/testData/diagnostics/tests/typealias/noApproximationInTypeAliasArgumentSubstitution.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
typealias Array2D = Array>
fun foo1(a: Array2D) = a
diff --git a/compiler/testData/diagnostics/tests/typealias/starProjection.kt b/compiler/testData/diagnostics/tests/typealias/starProjection.kt
index 098f5e4a02c..6214048ccb3 100644
--- a/compiler/testData/diagnostics/tests/typealias/starProjection.kt
+++ b/compiler/testData/diagnostics/tests/typealias/starProjection.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
typealias A = Map
typealias B = A<*>
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.kt
index 32a9242a1fe..618465f53c0 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorCrazyProjections.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Bound(val x: X, val y: Y)
typealias B = Bound
typealias BOutIn = Bound, in T>
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.kt
index e144f1498c8..8ae439d078d 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjection.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class C
typealias CStar = C<*>
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjectionInSupertypes.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjectionInSupertypes.kt
index b6389e8c9dd..78b259a506d 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjectionInSupertypes.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorForProjectionInSupertypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
open class C
typealias CStar = C<*>
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.kt
index 519efe38861..3344df760af 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Num(val x: Tn)
typealias N = Num
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt
index e34c2eb132b..892fc5ce81d 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Cons(val head: T, val tail: Cons?)
typealias C = Cons
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt
index 5fe130b151e..998e4c41482 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls2.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
interface Ref {
var x: T
}
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt
index 7482a10667d..3a5c7837a0a 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithPhantomTypes.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Foo
class Bar
diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.kt
index cb65a056d45..2c3f0e7d2fc 100644
--- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.kt
+++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorWrongVisibility.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
open class MyClass private constructor(val x: Int) {
protected constructor(x: String) : this(x.length)
diff --git a/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.kt b/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.kt
index 87464372375..cf1d58cd3f5 100644
--- a/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.kt
+++ b/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class Pair(val x1: T1, val x2: T2)
typealias P = Pair
diff --git a/compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.kt b/compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.kt
index ec307ded2b3..5d3072a3c92 100644
--- a/compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.kt
+++ b/compiler/testData/diagnostics/tests/varargs/NullableTypeForVarargArgument.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS:-UNUSED_PARAMETER
// KT-9883 prohibit using spread operator for nullable value
diff --git a/compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt b/compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt
index f60f61bbc20..17bdd585b18 100644
--- a/compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt
+++ b/compiler/testData/diagnostics/tests/varargs/assigningArraysToVarargsInAnnotations.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ArrayLiteralsInAnnotations, +AssigningArraysToVarargsInNamedFormInAnnotations
// FILE: JavaAnn.java
diff --git a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt b/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt
index 1872f59396d..78f3a6174d7 100644
--- a/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt
+++ b/compiler/testData/diagnostics/tests/varargs/noAssigningArraysToVarargsFeature.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !LANGUAGE: +ArrayLiteralsInAnnotations, -AssigningArraysToVarargsInNamedFormInAnnotations
// FILE: JavaAnn.java
diff --git a/compiler/testData/diagnostics/tests/when/BranchBypassVal.kt b/compiler/testData/diagnostics/tests/when/BranchBypassVal.kt
index 927a3ca63f0..7268250c185 100644
--- a/compiler/testData/diagnostics/tests/when/BranchBypassVal.kt
+++ b/compiler/testData/diagnostics/tests/when/BranchBypassVal.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A
fun test(a: Any): String {
diff --git a/compiler/testData/diagnostics/tests/when/BranchBypassVar.kt b/compiler/testData/diagnostics/tests/when/BranchBypassVar.kt
index b6102eb462f..df496b12bfe 100644
--- a/compiler/testData/diagnostics/tests/when/BranchBypassVar.kt
+++ b/compiler/testData/diagnostics/tests/when/BranchBypassVar.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
class A
fun test(a: Any) {
diff --git a/compiler/testData/diagnostics/tests/when/When.kt b/compiler/testData/diagnostics/tests/when/When.kt
index f05e2b0c6b8..bee12737a5f 100644
--- a/compiler/testData/diagnostics/tests/when/When.kt
+++ b/compiler/testData/diagnostics/tests/when/When.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun Int.foo() : Boolean = true
fun foo() : Int {
diff --git a/compiler/testData/diagnostics/tests/when/kt10439.kt b/compiler/testData/diagnostics/tests/when/kt10439.kt
index e7ca16086a3..485441e059d 100644
--- a/compiler/testData/diagnostics/tests/when/kt10439.kt
+++ b/compiler/testData/diagnostics/tests/when/kt10439.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun foo(x: Int) = x
fun test0(flag: Boolean) {
diff --git a/compiler/testData/diagnostics/tests/when/kt10809.kt b/compiler/testData/diagnostics/tests/when/kt10809.kt
index e04ff8feb23..74376006844 100644
--- a/compiler/testData/diagnostics/tests/when/kt10809.kt
+++ b/compiler/testData/diagnostics/tests/when/kt10809.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
// !DIAGNOSTICS: -UNUSED_PARAMETER -DEBUG_INFO_SMARTCAST
interface Data
diff --git a/compiler/testData/diagnostics/tests/when/kt9929.kt b/compiler/testData/diagnostics/tests/when/kt9929.kt
index 30bedd20c98..872e8edf3a0 100644
--- a/compiler/testData/diagnostics/tests/when/kt9929.kt
+++ b/compiler/testData/diagnostics/tests/when/kt9929.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val test: Int = if (true) {
when (2) {
1 -> 1
diff --git a/compiler/testData/diagnostics/tests/when/kt9972.kt b/compiler/testData/diagnostics/tests/when/kt9972.kt
index 0711a8ccdbd..0468e7b8976 100644
--- a/compiler/testData/diagnostics/tests/when/kt9972.kt
+++ b/compiler/testData/diagnostics/tests/when/kt9972.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
fun test1(): Int {
val x: String = if (true) {
when {
diff --git a/compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.kt b/compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.kt
index e45a3665d8e..150814a5180 100644
--- a/compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.kt
+++ b/compiler/testData/diagnostics/tests/when/whenAndLambdaWithExpectedType.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val test1: (String) -> Boolean =
when {
true -> {{ true }}
diff --git a/compiler/testData/diagnostics/tests/when/whenWithNothingAndLambdas.kt b/compiler/testData/diagnostics/tests/when/whenWithNothingAndLambdas.kt
index 0aada5bcd69..6f5fb549109 100644
--- a/compiler/testData/diagnostics/tests/when/whenWithNothingAndLambdas.kt
+++ b/compiler/testData/diagnostics/tests/when/whenWithNothingAndLambdas.kt
@@ -1,3 +1,4 @@
+// !WITH_NEW_INFERENCE
val test1 = when {
true -> { { true } }
else -> TODO()