diff --git a/idea/idea-test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt b/idea/idea-test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt index 173a967a20b..7395c64df6e 100644 --- a/idea/idea-test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt +++ b/idea/idea-test-framework/test/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt @@ -231,7 +231,9 @@ object CompilerTestDirectives { fun configureCompilerOptions(fileText: String, project: Project, module: Module): Boolean { val version = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// $LANGUAGE_VERSION_DIRECTIVE ") val jvmTarget = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// $JVM_TARGET_DIRECTIVE ") - val options = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// $COMPILER_ARGUMENTS_DIRECTIVE ") + // We can have several such directives in quickFixMultiFile tests + // TODO: refactor such tests or add sophisticated check for the directive + val options = InTextDirectivesUtils.findListWithPrefixes(fileText, "// $COMPILER_ARGUMENTS_DIRECTIVE ").firstOrNull() if (version != null || jvmTarget != null || options != null) { configureLanguageAndApiVersion(project, module, version ?: LanguageVersion.LATEST_STABLE.versionString) diff --git a/idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt b/idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt index 51596d7aacd..00536912e55 100644 --- a/idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt +++ b/idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt @@ -1,5 +1,6 @@ // "Add 'kotlin.Any' as upper bound for E" "true" // ERROR: Type parameter bound for U in fun foo(x: T, y: U): Int
is not satisfied: inferred type F is not a subtype of Any +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun foo(x: T, y: U) = 1 diff --git a/idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt.after b/idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt.after index dbdffbfa93b..ee9f244253c 100644 --- a/idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt.after +++ b/idea/testData/quickfix/addGenericUpperBound/inferenceTwoParams.kt.after @@ -1,5 +1,6 @@ // "Add 'kotlin.Any' as upper bound for E" "true" // ERROR: Type parameter bound for U in fun foo(x: T, y: U): Int
is not satisfied: inferred type F is not a subtype of Any +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun foo(x: T, y: U) = 1 diff --git a/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt b/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt index 6697999ba11..0580805e3e1 100644 --- a/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt +++ b/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt @@ -1,5 +1,6 @@ // "Add 'kotlin.Any' as upper bound for E" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference import kotlin.reflect.KClass diff --git a/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt.after b/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt.after index 0fbaa059ff3..4688fe4ca58 100644 --- a/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt.after +++ b/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt.after @@ -1,5 +1,6 @@ // "Add 'kotlin.Any' as upper bound for E" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference import kotlin.reflect.KClass diff --git a/idea/testData/quickfix/autoImports/dslMarkersOnReceiver.after.kt b/idea/testData/quickfix/autoImports/dslMarkersOnReceiver.after.kt index ba01b4ed61e..7bf0d2d3eca 100644 --- a/idea/testData/quickfix/autoImports/dslMarkersOnReceiver.after.kt +++ b/idea/testData/quickfix/autoImports/dslMarkersOnReceiver.after.kt @@ -3,6 +3,7 @@ import BExtSpace.aaa // "Import" "true" // WITH_RUNTIME // ERROR: Unresolved reference: aaa +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun test() { AAA().apply { diff --git a/idea/testData/quickfix/autoImports/dslMarkersOnReceiver.before.Main.kt b/idea/testData/quickfix/autoImports/dslMarkersOnReceiver.before.Main.kt index 49ffc4be76f..c7a6f6bc9cc 100644 --- a/idea/testData/quickfix/autoImports/dslMarkersOnReceiver.before.Main.kt +++ b/idea/testData/quickfix/autoImports/dslMarkersOnReceiver.before.Main.kt @@ -1,6 +1,7 @@ // "Import" "true" // WITH_RUNTIME // ERROR: Unresolved reference: aaa +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun test() { AAA().apply { diff --git a/idea/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test b/idea/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test index 615ba10c5e0..95aaee5aadc 100644 --- a/idea/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test +++ b/idea/testData/quickfix/autoImports/indexCallExtensionImportGetOnNoOperatorWarning.test @@ -1,6 +1,7 @@ // FILE: first.before.kt // "Import" "true" // ERROR: 'operator' modifier is required on 'get' in 'some.Some' +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package testing @@ -28,6 +29,7 @@ operator fun Some.get(s: String) {} // FILE: first.after.kt // "Import" "true" // ERROR: 'operator' modifier is required on 'get' in 'some.Some' +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package testing diff --git a/idea/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test b/idea/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test index 410c418aa6a..355a8cee1b3 100644 --- a/idea/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test +++ b/idea/testData/quickfix/autoImports/indexCallExtensionImportSetOnNoOperatorWarning.test @@ -1,6 +1,7 @@ // FILE: first.before.kt // "Import" "true" // ERROR: 'operator' modifier is required on 'set' in 'some.Some' +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package testing @@ -28,6 +29,7 @@ operator fun Some.set(s: String, i: Int) {} // FILE: first.after.kt // "Import" "true" // ERROR: 'operator' modifier is required on 'set' in 'some.Some' +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package testing diff --git a/idea/testData/quickfix/autoImports/minusOperator.after.kt b/idea/testData/quickfix/autoImports/minusOperator.after.kt index 7a95ae2fc57..0688ab7a463 100644 --- a/idea/testData/quickfix/autoImports/minusOperator.after.kt +++ b/idea/testData/quickfix/autoImports/minusOperator.after.kt @@ -1,5 +1,6 @@ // "Import" "true" // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public fun String.minus(i: Integer): String defined in h in file minusOperator.before.Main.kt
public fun String.minus(str: String): String defined in h in file minusOperator.before.Main.kt +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package h diff --git a/idea/testData/quickfix/autoImports/minusOperator.before.Main.kt b/idea/testData/quickfix/autoImports/minusOperator.before.Main.kt index 8dfd35db7f1..8d8074ee1af 100644 --- a/idea/testData/quickfix/autoImports/minusOperator.before.Main.kt +++ b/idea/testData/quickfix/autoImports/minusOperator.before.Main.kt @@ -1,5 +1,6 @@ // "Import" "true" // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
public fun String.minus(i: Integer): String defined in h in file minusOperator.before.Main.kt
public fun String.minus(str: String): String defined in h in file minusOperator.before.Main.kt +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package h diff --git a/idea/testData/quickfix/autoImports/mismatchingArgs/checkArgumentTypes.test b/idea/testData/quickfix/autoImports/mismatchingArgs/checkArgumentTypes.test index 4cd0d14bf60..dda3ef343ce 100644 --- a/idea/testData/quickfix/autoImports/mismatchingArgs/checkArgumentTypes.test +++ b/idea/testData/quickfix/autoImports/mismatchingArgs/checkArgumentTypes.test @@ -4,6 +4,7 @@ // ACTION: Add parameter to function 'foo' // ACTION: Create extension function 'X.foo' // ACTION: Create member function 'X.foo' +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package main @@ -30,6 +31,7 @@ fun X.foo(p: String) { // ACTION: Add parameter to function 'foo' // ACTION: Create extension function 'X.foo' // ACTION: Create member function 'X.foo' +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package main diff --git a/idea/testData/quickfix/autoImports/mismatchingArgs/lambdaArgument.test b/idea/testData/quickfix/autoImports/mismatchingArgs/lambdaArgument.test index c9e4358c06f..c0399b20c1b 100644 --- a/idea/testData/quickfix/autoImports/mismatchingArgs/lambdaArgument.test +++ b/idea/testData/quickfix/autoImports/mismatchingArgs/lambdaArgument.test @@ -1,6 +1,7 @@ // FILE: first.before.kt // "Import" "true" // ERROR: Type mismatch: inferred type is () -> Unit but Int was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package main @@ -23,6 +24,7 @@ fun X.foo(filter: (String) -> Boolean){} // FILE: first.after.kt // "Import" "true" // ERROR: Type mismatch: inferred type is () -> Unit but Int was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package main diff --git a/idea/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt b/idea/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt index feeb3f42a00..4f884f5e858 100644 --- a/idea/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt +++ b/idea/testData/quickfix/autoImports/plusOperatorWithTypeMismatch.before.Main.kt @@ -4,6 +4,7 @@ // ACTION: Create member function 'JustClass.plus' // ACTION: Flip '+' // ACTION: Replace overloaded operator with function call +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class JustClass diff --git a/idea/testData/quickfix/changeSignature/addParameterWithImport.after.kt b/idea/testData/quickfix/changeSignature/addParameterWithImport.after.kt index fa3f70ac901..8cb363beb1d 100644 --- a/idea/testData/quickfix/changeSignature/addParameterWithImport.after.kt +++ b/idea/testData/quickfix/changeSignature/addParameterWithImport.after.kt @@ -1,5 +1,6 @@ // "Add parameter to function 'foo'" "true" // ERROR: Too many arguments for public fun foo(): Unit defined in b in file addParameterWithImport.before.Dependency.kt +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package a import b.foo diff --git a/idea/testData/quickfix/changeSignature/addParameterWithImport.before.Main.kt b/idea/testData/quickfix/changeSignature/addParameterWithImport.before.Main.kt index 9e058c15742..408b7e14093 100644 --- a/idea/testData/quickfix/changeSignature/addParameterWithImport.before.Main.kt +++ b/idea/testData/quickfix/changeSignature/addParameterWithImport.before.Main.kt @@ -1,5 +1,6 @@ // "Add parameter to function 'foo'" "true" // ERROR: Too many arguments for public fun foo(): Unit defined in b in file addParameterWithImport.before.Dependency.kt +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference package a import b.foo diff --git a/idea/testData/quickfix/changeSignature/kj/addConstructorParameter.after.kt b/idea/testData/quickfix/changeSignature/kj/addConstructorParameter.after.kt index e3e37aa515f..8d8abd678eb 100644 --- a/idea/testData/quickfix/changeSignature/kj/addConstructorParameter.after.kt +++ b/idea/testData/quickfix/changeSignature/kj/addConstructorParameter.after.kt @@ -1,4 +1,5 @@ // "Add parameter to constructor 'Foo'" "true" // WITH_RUNTIME // DISABLE-ERRORS +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference private val foo = Foo(1, "2", setOf("3")) \ No newline at end of file diff --git a/idea/testData/quickfix/changeSignature/kj/addConstructorParameter.before.Main.kt b/idea/testData/quickfix/changeSignature/kj/addConstructorParameter.before.Main.kt index e3e37aa515f..8d8abd678eb 100644 --- a/idea/testData/quickfix/changeSignature/kj/addConstructorParameter.before.Main.kt +++ b/idea/testData/quickfix/changeSignature/kj/addConstructorParameter.before.Main.kt @@ -1,4 +1,5 @@ // "Add parameter to constructor 'Foo'" "true" // WITH_RUNTIME // DISABLE-ERRORS +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference private val foo = Foo(1, "2", setOf("3")) \ No newline at end of file diff --git a/idea/testData/quickfix/changeSignature/kj/addMethodParameter.after.kt b/idea/testData/quickfix/changeSignature/kj/addMethodParameter.after.kt index a272ad5cf77..17143ea19a7 100644 --- a/idea/testData/quickfix/changeSignature/kj/addMethodParameter.after.kt +++ b/idea/testData/quickfix/changeSignature/kj/addMethodParameter.after.kt @@ -1,4 +1,5 @@ // "Add parameter to function 'bar'" "true" // WITH_RUNTIME // DISABLE-ERRORS +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference private val foo = Foo().bar(1, "2", setOf("3")) \ No newline at end of file diff --git a/idea/testData/quickfix/changeSignature/kj/addMethodParameter.before.Main.kt b/idea/testData/quickfix/changeSignature/kj/addMethodParameter.before.Main.kt index a272ad5cf77..17143ea19a7 100644 --- a/idea/testData/quickfix/changeSignature/kj/addMethodParameter.before.Main.kt +++ b/idea/testData/quickfix/changeSignature/kj/addMethodParameter.before.Main.kt @@ -1,4 +1,5 @@ // "Add parameter to function 'bar'" "true" // WITH_RUNTIME // DISABLE-ERRORS +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference private val foo = Foo().bar(1, "2", setOf("3")) \ No newline at end of file diff --git a/idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt b/idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt index 140d929cb1c..a52fc3e6e34 100644 --- a/idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt +++ b/idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt @@ -3,6 +3,7 @@ // ACTION: Introduce local variable // ERROR: The integer literal does not conform to the expected type Unit // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun foo(f:()->Int){} diff --git a/idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt.after b/idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt.after index 728821f61f9..d8b08b8a1e6 100644 --- a/idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt.after +++ b/idea/testData/quickfix/changeToLabeledReturn/multipleInner.kt.after @@ -3,6 +3,7 @@ // ACTION: Introduce local variable // ERROR: The integer literal does not conform to the expected type Unit // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun foo(f:()->Int){} diff --git a/idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt b/idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt index 57f2ab7d8ff..15b4214b75c 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt @@ -1,5 +1,6 @@ // "Create extension function 'Int.plus'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val n: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt.after b/idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt.after index ae58112a6dd..1d7261f0382 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt.after +++ b/idea/testData/quickfix/createFromUsage/createFunction/binaryOperations/plusOnLibType.kt.after @@ -1,5 +1,6 @@ // "Create extension function 'Int.plus'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val n: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt index c3149254667..c17d26421f3 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt @@ -1,5 +1,6 @@ // "Create extension function 'Int.foo'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val n: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt.after b/idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt.after index 6fab7c80d83..d7711e865e6 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt.after +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/funOnLibType.kt.after @@ -1,5 +1,6 @@ // "Create extension function 'Int.foo'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val n: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt index 5aa09e757d5..e8d8855e919 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt @@ -1,4 +1,5 @@ // "Create member function 'A.foo'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val n: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt.after b/idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt.after index 1b9ff45021a..e1e532cfd1a 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt.after +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/funWithExplicitParamNamesOnUserType.kt.after @@ -1,4 +1,5 @@ // "Create member function 'A.foo'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val n: T) { fun foo(abc: T, ghi: A, def: String): A { diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt index a90ec46ac54..ba82d20f997 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt @@ -1,4 +1,5 @@ // "Create function 'bar'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val t: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt.after b/idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt.after index 2b2bd472d3c..ae1ca8fc2af 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt.after +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/inAnonymousFunExprWithExpectedType.kt.after @@ -1,4 +1,5 @@ // "Create function 'bar'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val t: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt index adb2b0f1251..53141f66f12 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt @@ -1,4 +1,5 @@ // "Create function 'foo'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun run(f: () -> T) = f() diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt.after b/idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt.after index d743f4bac24..80c6cbcf9ba 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt.after +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/inLambda.kt.after @@ -1,4 +1,5 @@ // "Create function 'foo'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun run(f: () -> T) = f() diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt index fd9a468e06d..f81ac557d2f 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt @@ -1,4 +1,5 @@ // "Create function 'bar'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val t: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt.after b/idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt.after index 4af16d31aea..28b2047ea35 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt.after +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/inLambdaWithExpectedType.kt.after @@ -1,4 +1,5 @@ // "Create function 'bar'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val t: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt b/idea/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt index fe1b697b5e2..8413673bcf1 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/call/kt10983.kt @@ -12,6 +12,7 @@ // ERROR: Type inference failed: inline fun Iterable.firstOrNull(predicate: (T) -> Boolean): T?
cannot be applied to
receiver: Collection> arguments: ((List) -> () -> Boolean)
// ERROR: Type mismatch: inferred type is (List) -> () -> Boolean but (List) -> Boolean was expected // ERROR: Unresolved reference: maximumSizeOfGroup +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun doSomethingStrangeWithCollection(collection: Collection): Collection? { val groupsByLength = collection.groupBy { s -> { s.length } } diff --git a/idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt b/idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt index 2f5c2f8ce43..e91cc2fc843 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt +++ b/idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt @@ -1,4 +1,5 @@ // "Create member function 'A.invoke'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val n: T) diff --git a/idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt.after b/idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt.after index 9d289394f3b..f9e0fde6b70 100644 --- a/idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt.after +++ b/idea/testData/quickfix/createFromUsage/createFunction/invoke/invokeWithExplicitParamNamesOnUserType.kt.after @@ -1,4 +1,5 @@ // "Create member function 'A.invoke'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A(val n: T) { operator fun invoke(abc: T, ghi: A, def: String): A { diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt index a6939e35e25..a2135897d88 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt @@ -1,5 +1,6 @@ // "Create type parameter 'X' in class 'Foo'" "true" // ERROR: Type mismatch: inferred type is A but A was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A open class Foo(x: A<X>) diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt.after b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt.after index 281cd09c94f..aadb3c4e396 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt.after +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplication.kt.after @@ -1,5 +1,6 @@ // "Create type parameter 'X' in class 'Foo'" "true" // ERROR: Type mismatch: inferred type is A but A was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A open class Foo(x: A) diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt index 0d983c5e266..670ec66e4fc 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt @@ -3,6 +3,7 @@ // ERROR: Unresolved reference: _ // ERROR: Unresolved reference: _ // ERROR: Type mismatch: inferred type is A but A> was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A> interface I : List diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt.after b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt.after index c9e121e4b07..f681c9ba040 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt.after +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndRecursiveUpperBound.kt.after @@ -3,6 +3,7 @@ // ERROR: Unresolved reference: _ // ERROR: Unresolved reference: _ // ERROR: Type mismatch: inferred type is A but A> was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A> interface I : List diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt index 8df10a49e43..73c1fc6e463 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt @@ -1,4 +1,5 @@ // "Create type parameter 'X' in class 'Foo'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A> open class Foo(x: A<X>) diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt.after b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt.after index 96d8a952c84..d6bd8742a4e 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt.after +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/classWithExplicationAndUpperBound.kt.after @@ -1,4 +1,5 @@ // "Create type parameter 'X' in class 'Foo'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A> open class Foo>(x: A) diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt index 2406bb720cf..9826809006f 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt @@ -1,5 +1,6 @@ // "Create type parameter 'X' in function 'foo'" "true" // ERROR: Unresolved reference: _ +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A> interface I : List diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt.after b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt.after index 46e9ec7522d..7f5ec1f35fc 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt.after +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndRecursiveUpperBound.kt.after @@ -1,5 +1,6 @@ // "Create type parameter 'X' in function 'foo'" "true" // ERROR: Unresolved reference: _ +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A> interface I : List diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt index fc744eb0c38..e0866ae12df 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt @@ -1,4 +1,5 @@ // "Create type parameter 'X' in function 'foo'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A> fun foo(x: A<X>) { diff --git a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt.after b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt.after index e08bf18ffd6..ed9e49df11d 100644 --- a/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt.after +++ b/idea/testData/quickfix/createFromUsage/createTypeParameter/inContainingDeclaration/functionWithExplicationAndUpperBound.kt.after @@ -1,4 +1,5 @@ // "Create type parameter 'X' in function 'foo'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A> fun > foo(x: A) { diff --git a/idea/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt b/idea/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt index f36eb1d7f43..448ed164792 100644 --- a/idea/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt +++ b/idea/testData/quickfix/createFromUsage/createVariable/localVariable/nonIdentifier.kt @@ -3,6 +3,7 @@ // ACTION: Create member function 'A.minus' // ACTION: Replace overloaded operator with function call // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
@InlineOnly public inline operator fun BigDecimal.minus(other: BigDecimal): BigDecimal defined in kotlin
@InlineOnly public inline operator fun BigInteger.minus(other: BigInteger): BigInteger defined in kotlin
public operator fun Iterable.minus(elements: Array): List defined in kotlin.collections
public operator fun Iterable.minus(elements: Iterable): List defined in kotlin.collections
public operator fun Iterable.minus(elements: Sequence): List defined in kotlin.collections
public operator fun Iterable.minus(element: A): List defined in kotlin.collections
@SinceKotlin public operator fun Map.minus(keys: Array): Map defined in kotlin.collections
@SinceKotlin public operator fun Map.minus(keys: Iterable): Map defined in kotlin.collections
@SinceKotlin public operator fun Map.minus(keys: Sequence): Map defined in kotlin.collections
@SinceKotlin public operator fun Map.minus(key: A): Map defined in kotlin.collections
public operator fun Set.minus(elements: Array): Set defined in kotlin.collections
public operator fun Set.minus(elements: Iterable): Set defined in kotlin.collections
public operator fun Set.minus(elements: Sequence): Set defined in kotlin.collections
public operator fun Set
.minus(element: A): Set defined in kotlin.collections
public operator fun Sequence.minus(elements: Array): Sequence defined in kotlin.sequences
public operator fun Sequence.minus(elements: Iterable): Sequence defined in kotlin.sequences
public operator fun Sequence.minus(elements: Sequence): Sequence defined in kotlin.sequences
public operator fun Sequence
.minus(element: A): Sequence defined in kotlin.sequences +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A fun bar() { diff --git a/idea/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt b/idea/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt index 5f7e8750fc0..3c52fb31380 100644 --- a/idea/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt +++ b/idea/testData/quickfix/createFromUsage/createVariable/parameter/nonIdentifier.kt @@ -3,6 +3,7 @@ // ACTION: Create member function 'A.minus' // ACTION: Replace overloaded operator with function call // ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch:
@InlineOnly public inline operator fun BigDecimal.minus(other: BigDecimal): BigDecimal defined in kotlin
@InlineOnly public inline operator fun BigInteger.minus(other: BigInteger): BigInteger defined in kotlin
public operator fun Iterable.minus(elements: Array): List defined in kotlin.collections
public operator fun Iterable.minus(elements: Iterable): List defined in kotlin.collections
public operator fun Iterable.minus(elements: Sequence): List defined in kotlin.collections
public operator fun Iterable
.minus(element: A): List defined in kotlin.collections
@SinceKotlin public operator fun Map.minus(keys: Array): Map defined in kotlin.collections
@SinceKotlin public operator fun Map.minus(keys: Iterable): Map defined in kotlin.collections
@SinceKotlin public operator fun Map.minus(keys: Sequence): Map defined in kotlin.collections
@SinceKotlin public operator fun Map.minus(key: A): Map defined in kotlin.collections
public operator fun Set.minus(elements: Array): Set defined in kotlin.collections
public operator fun Set.minus(elements: Iterable): Set defined in kotlin.collections
public operator fun Set.minus(elements: Sequence): Set defined in kotlin.collections
public operator fun Set
.minus(element: A): Set defined in kotlin.collections
public operator fun Sequence.minus(elements: Array): Sequence defined in kotlin.sequences
public operator fun Sequence.minus(elements: Iterable): Sequence defined in kotlin.sequences
public operator fun Sequence.minus(elements: Sequence): Sequence defined in kotlin.sequences
public operator fun Sequence
.minus(element: A): Sequence defined in kotlin.sequences +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A fun bar() { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt index 80b659be2a3..5836f2bdf66 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt @@ -1,6 +1,7 @@ // "Replace with 'New'" "true" // WITH_RUNTIME // ERROR: Type inference failed: Not enough information to infer parameter T in constructor New()
Please specify it explicitly.
+// COMPILER_ARGUMENTS: -XXLanguage:-NewInference abstract class Main diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt.after index 7819790d5f2..cf308d6a64f 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgument7.kt.after @@ -1,6 +1,7 @@ // "Replace with 'New'" "true" // WITH_RUNTIME // ERROR: Type inference failed: Not enough information to infer parameter T in constructor New()
Please specify it explicitly.
+// COMPILER_ARGUMENTS: -XXLanguage:-NewInference abstract class Main diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt index f1fbfe08cef..003fb2157a7 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt @@ -1,5 +1,6 @@ // "Replace with 'Factory()'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class Foo @Deprecated("", ReplaceWith("Factory()")) constructor() fun Factory(): Foo = TODO() diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt.after index cf6209d60e0..b642d610bb6 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/constructorUsageWithTypeArgumentWithoutSpecifyType.kt.after @@ -1,5 +1,6 @@ // "Replace with 'Factory()'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class Foo @Deprecated("", ReplaceWith("Factory()")) constructor() fun Factory(): Foo = TODO() diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt b/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt index d984532dafd..b2c16fc3412 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt @@ -1,5 +1,6 @@ // "Replace with 'addA(d(createDummy, dummyParam1, initDummy), dummyParam)'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference typealias NewDummyRef = (Any) -> V diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt.after index 37c9b8a78ad..8bdc3d7ab68 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameterAndLambdaComplex.kt.after @@ -1,5 +1,6 @@ // "Replace with 'addA(d(createDummy, dummyParam1, initDummy), dummyParam)'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference typealias NewDummyRef = (Any) -> V diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt index bdadd225806..c57804dc013 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference @Deprecated("", ReplaceWith("newFun()")) fun oldFun(): T? { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt.after index c81ba2fc616..d4256839799 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitInPatternImplicitInUsage.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference @Deprecated("", ReplaceWith("newFun()")) fun oldFun(): T? { diff --git a/idea/testData/quickfix/foldTryCatch/shadow.kt b/idea/testData/quickfix/foldTryCatch/shadow.kt index bcf80cf62df..bbd9bb52edb 100644 --- a/idea/testData/quickfix/foldTryCatch/shadow.kt +++ b/idea/testData/quickfix/foldTryCatch/shadow.kt @@ -3,6 +3,7 @@ // ERROR: Val cannot be reassigned // ERROR: Val cannot be reassigned // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun foo() { val x = 1 diff --git a/idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt b/idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt index 5b887b1942b..a85810f2bf4 100644 --- a/idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt +++ b/idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInvokeWithImplicitReceiver.kt @@ -5,5 +5,6 @@ // ACTION: Replace with safe (this?.) call // ACTION: Wrap with '?.let { ... }' call // ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type String? +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun String?.foo(exec: (String.() -> Unit)) = exec() \ No newline at end of file diff --git a/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt b/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt index b6f04efce7c..02ba31f1e47 100644 --- a/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt +++ b/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt @@ -1,5 +1,6 @@ // "Remove '.java'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun foo() { bar(Foo::class.java) } diff --git a/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt.after b/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt.after index 2bd4a5b3f1d..649a11369f0 100644 --- a/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt.after +++ b/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt.after @@ -1,5 +1,6 @@ // "Remove '.java'" "true" // WITH_RUNTIME +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun foo() { bar(Foo::class) } diff --git a/idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt b/idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt index a2b14f7bf57..950984918e4 100644 --- a/idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt +++ b/idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt @@ -1,4 +1,5 @@ // "Cast expression 'x' to 'Foo<*>'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference interface Foo { fun bar() diff --git a/idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt.after b/idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt.after index 2ddebd2b1f7..a52046711b1 100644 --- a/idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt.after +++ b/idea/testData/quickfix/typeMismatch/casts/smartcastImpossible3.kt.after @@ -1,4 +1,5 @@ // "Cast expression 'x' to 'Foo<*>'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference interface Foo { fun bar() diff --git a/idea/testData/quickfix/typeMismatch/casts/typeMismatch2.kt b/idea/testData/quickfix/typeMismatch/casts/typeMismatch2.kt index 27a6580cdf8..de698651c45 100644 --- a/idea/testData/quickfix/typeMismatch/casts/typeMismatch2.kt +++ b/idea/testData/quickfix/typeMismatch/casts/typeMismatch2.kt @@ -2,6 +2,7 @@ // ACTION: Change return type of enclosing function 'foo' to 'Foo' // ACTION: Introduce import alias // ERROR: Type mismatch: inferred type is Foo but Foo was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class Foo fun foo(): Foo { diff --git a/idea/testData/quickfix/typeMismatch/casts/unsigned.kt b/idea/testData/quickfix/typeMismatch/casts/unsigned.kt index e09e71f468c..90c9a7fd6f8 100644 --- a/idea/testData/quickfix/typeMismatch/casts/unsigned.kt +++ b/idea/testData/quickfix/typeMismatch/casts/unsigned.kt @@ -6,6 +6,7 @@ // ACTION: Change to '1u' // ACTION: Do not show hints for current method // ACTION: Add 'u =' to argument +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun takeUInt(u: UInt) = 0 diff --git a/idea/testData/quickfix/typeMismatch/kt17404.kt b/idea/testData/quickfix/typeMismatch/kt17404.kt index 36d8d1370a8..b6e13e14918 100644 --- a/idea/testData/quickfix/typeMismatch/kt17404.kt +++ b/idea/testData/quickfix/typeMismatch/kt17404.kt @@ -1,4 +1,5 @@ // "Change type from 'Int' to 'X'" "true" // ERROR: Cannot use 'X' as reified type parameter. Use a class instead. +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference inline fun inlineReified0(f: (T) -> T) = {} fun callInlineReified3() = inlineReified0({ x: Int -> x }) \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/kt17404.kt.after b/idea/testData/quickfix/typeMismatch/kt17404.kt.after index a4d7d8fda38..7934c43e374 100644 --- a/idea/testData/quickfix/typeMismatch/kt17404.kt.after +++ b/idea/testData/quickfix/typeMismatch/kt17404.kt.after @@ -1,4 +1,5 @@ // "Change type from 'Int' to 'X'" "true" // ERROR: Cannot use 'X' as reified type parameter. Use a class instead. +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference inline fun inlineReified0(f: (T) -> T) = {} fun callInlineReified3() = inlineReified0({ x: X -> x }) \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/paramTypeLambdaMatchNullable.kt b/idea/testData/quickfix/typeMismatch/paramTypeLambdaMatchNullable.kt index add09234135..b19529402a3 100644 --- a/idea/testData/quickfix/typeMismatch/paramTypeLambdaMatchNullable.kt +++ b/idea/testData/quickfix/typeMismatch/paramTypeLambdaMatchNullable.kt @@ -1,5 +1,6 @@ // "Surround with lambda" "true" // ERROR: Type mismatch: inferred type is String? but String was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun nullableFn() { val nullableStr: String? = null str(nullableStr) diff --git a/idea/testData/quickfix/typeMismatch/paramTypeLambdaMatchNullable.kt.after b/idea/testData/quickfix/typeMismatch/paramTypeLambdaMatchNullable.kt.after index 33cf4b03116..5006d31b2d1 100644 --- a/idea/testData/quickfix/typeMismatch/paramTypeLambdaMatchNullable.kt.after +++ b/idea/testData/quickfix/typeMismatch/paramTypeLambdaMatchNullable.kt.after @@ -1,5 +1,6 @@ // "Surround with lambda" "true" // ERROR: Type mismatch: inferred type is String? but String was expected +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference fun nullableFn() { val nullableStr: String? = null str({ nullableStr }) diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt index a7968ffdd81..19572cd7386 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt @@ -1,4 +1,5 @@ // "Change type of 'A.x' to '() -> Int'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A { var x: Int get(): Int = if (true) { {42} } else { {24} } diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt.after index 739a3358e0e..93570d9a4ef 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/propertyGetterInitializerTypeMismatch.kt.after @@ -1,4 +1,5 @@ // "Change type of 'A.x' to '() -> Int'" "true" +// COMPILER_ARGUMENTS: -XXLanguage:-NewInference class A { var x: () -> Int get(): () -> Int = if (true) { {42} } else { {24} }