From e2f75463d71439f28c06b1b4ea576d91db9cc397 Mon Sep 17 00:00:00 2001 From: Dmitry Jemerov Date: Thu, 23 Mar 2017 19:47:39 +0100 Subject: [PATCH] Rewrite AbstractQuickFixTest based on light fixture test case Don't reconfigure runtime before every test. For consistency, mark tests that require the runtime with directives instead of relying on test file names. --- .../KotlinLightCodeInsightFixtureTestCase.kt | 19 +- .../addGenericUpperBound/kClassRuntime.kt | 1 + .../kClassRuntime.kt.after | 1 + .../memberPropertyWithDelegateRuntime.kt | 1 + .../autoImports/libraryPropertyJsRuntime.kt | 1 + .../libraryPropertyJsRuntime.kt.after | 1 + .../autoImports/libraryPropertyRuntime.kt | 1 + .../libraryPropertyRuntime.kt.after | 1 + .../libraryTopLevelFunctionImportJsRuntime.kt | 1 + ...ryTopLevelFunctionImportJsRuntime.kt.after | 1 + .../libraryTopLevelFunctionImportRuntime.kt | 1 + ...raryTopLevelFunctionImportRuntime.kt.after | 1 + .../annotationNoReceiver.kt | 1 - .../referenceExpression/classNoReceiver.kt | 1 - .../enumEntryNoReceiver.kt | 1 - .../referenceExpression/enumNoReceiver.kt | 1 - .../referenceExpression/traitNoReceiver.kt | 1 - .../complexExpressionNotUsed3Runtime.kt | 1 + .../complexExpressionNotUsed3Runtime.kt.after | 1 + .../complexExpressionNotUsed4Runtime.kt | 1 + .../complexExpressionNotUsed4Runtime.kt.after | 1 + .../complexExpressionNotUsed5Runtime.kt | 1 + .../complexExpressionNotUsed5Runtime.kt.after | 1 + ...omplexExpressionNotUsedSafeCall2Runtime.kt | 1 + ...ExpressionNotUsedSafeCall2Runtime.kt.after | 1 + ...plexExpressionNotUsedShortenRefsRuntime.kt | 1 + ...pressionNotUsedShortenRefsRuntime.kt.after | 1 + .../complexExpressionUsedTwice3Runtime.kt | 1 + ...omplexExpressionUsedTwice3Runtime.kt.after | 1 + .../complexExpressionUsedTwice5Runtime.kt | 1 + ...omplexExpressionUsedTwice5Runtime.kt.after | 1 + .../complexExpressionUsedTwice6Runtime.kt | 1 + ...omplexExpressionUsedTwice6Runtime.kt.after | 1 + .../classLiteralAndTypeArgsRuntime.kt | 1 + .../classLiteralAndTypeArgsRuntime.kt.after | 1 + .../implicitQualifiedThisRuntime.kt | 1 + .../implicitQualifiedThisRuntime.kt.after | 1 + .../lineBreakAfterReceiverRuntime.kt | 1 + .../lineBreakAfterReceiverRuntime.kt.after | 1 + .../changeThisSafeCallWithValue1Runtime.kt | 1 + ...angeThisSafeCallWithValue1Runtime.kt.after | 1 + .../changeThisSafeCallWithValue2Runtime.kt | 1 + ...angeThisSafeCallWithValue2Runtime.kt.after | 1 + .../changeThisSafeCallWithValue3Runtime.kt | 1 + ...angeThisSafeCallWithValue3Runtime.kt.after | 1 + .../changeThisSafeCallWithValue4Runtime.kt | 1 + ...angeThisSafeCallWithValue4Runtime.kt.after | 1 + .../changeThisSafeCallWithValueRuntime.kt | 1 + ...hangeThisSafeCallWithValueRuntime.kt.after | 1 + .../typeArguments/emptyVarargRuntime.kt | 1 + .../typeArguments/emptyVarargRuntime.kt.after | 1 + .../typeArguments/keepInUserCodeRuntime.kt | 1 + .../keepInUserCodeRuntime.kt.after | 1 + .../noImplicitTypeArgImportRuntime.kt | 1 + .../noImplicitTypeArgImportRuntime.kt.after | 1 + .../typeArguments/nonEmptyVarargRuntime.kt | 1 + .../nonEmptyVarargRuntime.kt.after | 1 + .../vararg/addedNamedArgumentAfterRuntime.kt | 1 + .../addedNamedArgumentAfterRuntime.kt.after | 1 + .../addedPositionalArgumentAfterRuntime.kt | 1 + ...dedPositionalArgumentAfterRuntime.kt.after | 1 + .../vararg/addedSpreadArgumentAfterRuntime.kt | 1 + .../addedSpreadArgumentAfterRuntime.kt.after | 1 + .../vararg/booleanArrayRuntime.kt | 1 + .../vararg/booleanArrayRuntime.kt.after | 1 + .../vararg/byteArrayRuntime.kt | 1 + .../vararg/byteArrayRuntime.kt.after | 1 + .../doNotShortenUserReferences2Runtime.kt | 1 + ...oNotShortenUserReferences2Runtime.kt.after | 1 + .../doNotShortenUserReferencesRuntime.kt | 1 + ...doNotShortenUserReferencesRuntime.kt.after | 1 + .../doNotSimplifyOriginalCallRuntime.kt | 1 + .../doNotSimplifyOriginalCallRuntime.kt.after | 1 + .../vararg/doubleArrayRuntime.kt | 1 + .../vararg/doubleArrayRuntime.kt.after | 1 + .../vararg/floatArrayRuntime.kt | 1 + .../vararg/floatArrayRuntime.kt.after | 1 + .../vararg/longArrayRuntime.kt | 1 + .../vararg/longArrayRuntime.kt.after | 1 + .../vararg/multipleSpreadArguments2Runtime.kt | 1 + .../multipleSpreadArguments2Runtime.kt.after | 1 + .../vararg/multipleSpreadArgumentsRuntime.kt | 1 + .../multipleSpreadArgumentsRuntime.kt.after | 1 + .../vararg/noImportRuntime.kt | 1 + .../vararg/noImportRuntime.kt.after | 1 + .../vararg/shortArrayRuntime.kt | 1 + .../vararg/shortArrayRuntime.kt.after | 1 + .../vararg/vararg1Runtime.kt | 1 + .../vararg/vararg1Runtime.kt.after | 1 + .../vararg/vararg2Runtime.kt | 1 + .../vararg/vararg2Runtime.kt.after | 1 + .../vararg/vararg3Runtime.kt | 1 + .../vararg/vararg3Runtime.kt.after | 1 + .../vararg/vararg6Runtime.kt | 1 + .../vararg/vararg6Runtime.kt.after | 1 + .../vararg/vararg8Runtime.kt | 1 + .../vararg/vararg8Runtime.kt.after | 1 + .../memberPropertyWithDelegateRuntime.kt | 1 + .../externalExtensionFunJsRuntime.kt | 1 + .../externalExtensionFunJsRuntime.kt.after | 1 + .../externalExtensionFunParamsJsRuntime.kt | 1 + ...ternalExtensionFunParamsJsRuntime.kt.after | 1 + .../externalExtensionVarJsRuntime.kt | 1 + .../externalExtensionVarJsRuntime.kt.after | 1 + .../nativeExtensionFunBlockBodyJsRuntime.kt | 1 + ...iveExtensionFunBlockBodyJsRuntime.kt.after | 1 + .../jsExternal/nativeExtensionFunJsRuntime.kt | 1 + .../nativeExtensionFunJsRuntime.kt.after | 1 + .../nativeExtensionFunParamsJsRuntime.kt | 1 + ...nativeExtensionFunParamsJsRuntime.kt.after | 1 + .../nativeExtensionVaslJsRuntime.kt | 1 + .../nativeExtensionVaslJsRuntime.kt.after | 1 + .../visibilityModiferOverrideJavaRuntime.kt | 1 + ...ibilityModiferOverrideJavaRuntime.kt.after | 1 + .../memberPropertyWithDelegateRuntime.kt | 1 + .../removeSingleLambdaParameter/multiple.kt | 2 +- .../convertClassToKClass1Runtime.kt | 1 + .../convertClassToKClass1Runtime.kt.after | 1 + .../propertyTypeMismatchLongNameRuntime.kt | 1 + ...opertyTypeMismatchLongNameRuntime.kt.after | 1 + .../nonLocalReturnRuntime.kt | 1 + .../nonLocalReturnRuntime.kt.after | 1 + .../nonLocalReturnWithLabelRuntime.kt | 1 + .../nonLocalReturnWithLabelRuntime.kt.after | 1 + .../idea/KotlinLightQuickFixTestCase.java | 44 ---- .../idea/quickfix/AbstractQuickFixTest.kt | 242 ++++++------------ .../quickfixes/AbstractSpringQuickFixTest.kt | 2 +- 127 files changed, 204 insertions(+), 227 deletions(-) delete mode 100644 idea/tests/org/jetbrains/kotlin/idea/KotlinLightQuickFixTestCase.java diff --git a/idea/idea-test-framework/src/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt b/idea/idea-test-framework/src/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt index f8c807a3972..bdad3a6a3d9 100644 --- a/idea/idea-test-framework/src/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt +++ b/idea/idea-test-framework/src/org/jetbrains/kotlin/idea/test/KotlinLightCodeInsightFixtureTestCase.kt @@ -49,6 +49,8 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix protected val module: Module get() = myFixture.module + protected open val captureExceptions = true + override fun setUp() { super.setUp() (StartupManager.getInstance(project) as StartupManagerImpl).runPostStartupActivities() @@ -61,12 +63,14 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix invalidateLibraryCache(project) - LoggedErrorProcessor.setNewInstance(object : LoggedErrorProcessor() { - override fun processError(message: String?, t: Throwable?, details: Array?, logger: Logger) { - exceptions.addIfNotNull(t) - super.processError(message, t, details, logger) - } - }) + if (captureExceptions) { + LoggedErrorProcessor.setNewInstance(object : LoggedErrorProcessor() { + override fun processError(message: String?, t: Throwable?, details: Array?, logger: Logger) { + exceptions.addIfNotNull(t) + super.processError(message, t, details, logger) + } + }) + } } override fun tearDown() { @@ -116,6 +120,9 @@ abstract class KotlinLightCodeInsightFixtureTestCase : KotlinLightCodeInsightFix else if (InTextDirectivesUtils.isDirectiveDefined(fileText, "RUNTIME_WITH_KOTLIN_TEST")) { return KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE_WITH_KOTLIN_TEST } + else if (InTextDirectivesUtils.isDirectiveDefined(fileText, "RUNTIME_WITH_FULL_JDK")) { + return KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE_FULL_JDK + } else if (InTextDirectivesUtils.isDirectiveDefined(fileText, "RUNTIME") || InTextDirectivesUtils.isDirectiveDefined(fileText, "WITH_RUNTIME")) { return KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE diff --git a/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt b/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt index b5e3acdbf80..6697999ba11 100644 --- a/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt +++ b/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt @@ -1,4 +1,5 @@ // "Add 'kotlin.Any' as upper bound for E" "true" +// WITH_RUNTIME import kotlin.reflect.KClass diff --git a/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt.after b/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt.after index 60835471d0c..0fbaa059ff3 100644 --- a/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt.after +++ b/idea/testData/quickfix/addGenericUpperBound/kClassRuntime.kt.after @@ -1,4 +1,5 @@ // "Add 'kotlin.Any' as upper bound for E" "true" +// WITH_RUNTIME import kotlin.reflect.KClass diff --git a/idea/testData/quickfix/addInitializer/memberPropertyWithDelegateRuntime.kt b/idea/testData/quickfix/addInitializer/memberPropertyWithDelegateRuntime.kt index 9368971fd8b..2673b5331b9 100644 --- a/idea/testData/quickfix/addInitializer/memberPropertyWithDelegateRuntime.kt +++ b/idea/testData/quickfix/addInitializer/memberPropertyWithDelegateRuntime.kt @@ -2,6 +2,7 @@ // ACTION: Make internal // ACTION: Make private // ACTION: Make protected +// WITH_RUNTIME class A { val n: Int by lazy { 0 } } \ No newline at end of file diff --git a/idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt b/idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt index 5b2f39b0d5e..0280ca2b73f 100644 --- a/idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt +++ b/idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt @@ -1,4 +1,5 @@ // "Import" "true" +// JS package test diff --git a/idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt.after b/idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt.after index 16a10b06211..f64e1ccc221 100644 --- a/idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt.after +++ b/idea/testData/quickfix/autoImports/libraryPropertyJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Import" "true" +// JS package test diff --git a/idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt b/idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt index 6e6e0f36afa..7067bc3f1ae 100644 --- a/idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt +++ b/idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt @@ -1,4 +1,5 @@ // "Import" "true" +// RUNTIME_WITH_KOTLIN_TEST package test diff --git a/idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt.after b/idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt.after index 02c31c88ee6..3ea8bb997d8 100644 --- a/idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt.after +++ b/idea/testData/quickfix/autoImports/libraryPropertyRuntime.kt.after @@ -1,4 +1,5 @@ // "Import" "true" +// RUNTIME_WITH_KOTLIN_TEST package test diff --git a/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt b/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt index ce2c54ee0a6..fc477b7556b 100644 --- a/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt +++ b/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt @@ -1,4 +1,5 @@ // "Import" "true" +// JS package some fun testFun() { diff --git a/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt.after b/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt.after index 9191f37fa61..db97ec8ef81 100644 --- a/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt.after +++ b/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Import" "true" +// JS package some import jquery.jq diff --git a/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt b/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt index 938f05a571e..3968eeeb0f6 100644 --- a/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt +++ b/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt @@ -1,4 +1,5 @@ // "Import" "true" +// WITH_RUNTIME package some fun testFun() { diff --git a/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt.after b/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt.after index 688dd07233d..89059ae9396 100644 --- a/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt.after +++ b/idea/testData/quickfix/autoImports/libraryTopLevelFunctionImportRuntime.kt.after @@ -1,4 +1,5 @@ // "Import" "true" +// WITH_RUNTIME package some import kotlin.system.measureNanoTime diff --git a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/annotationNoReceiver.kt b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/annotationNoReceiver.kt index e1a3233384b..23ff4c5551f 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/annotationNoReceiver.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/annotationNoReceiver.kt @@ -3,7 +3,6 @@ // ACTION: Create local variable 'A' // ACTION: Create parameter 'A' // ACTION: Create property 'A' -// ACTION: Import // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classNoReceiver.kt b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classNoReceiver.kt index f3514496c15..87fec207b4c 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classNoReceiver.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/classNoReceiver.kt @@ -4,7 +4,6 @@ // ACTION: Create parameter 'A' // ACTION: Create property 'A' // ACTION: Rename reference -// ACTION: Import // ERROR: Unresolved reference: A package p diff --git a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryNoReceiver.kt b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryNoReceiver.kt index a64b020e0ce..a3aeea08e12 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryNoReceiver.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumEntryNoReceiver.kt @@ -3,7 +3,6 @@ // ACTION: Create local variable 'A' // ACTION: Create parameter 'A' // ACTION: Create property 'A' -// ACTION: Import // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumNoReceiver.kt b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumNoReceiver.kt index e6abc56254a..dbb8d100de8 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumNoReceiver.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/enumNoReceiver.kt @@ -3,7 +3,6 @@ // ACTION: Create local variable 'A' // ACTION: Create parameter 'A' // ACTION: Create property 'A' -// ACTION: Import // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitNoReceiver.kt b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitNoReceiver.kt index 2513c527773..b90d19fb929 100644 --- a/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitNoReceiver.kt +++ b/idea/testData/quickfix/createFromUsage/createClass/referenceExpression/traitNoReceiver.kt @@ -3,7 +3,6 @@ // ACTION: Create local variable 'A' // ACTION: Create parameter 'A' // ACTION: Create property 'A' -// ACTION: Import // ACTION: Rename reference // ERROR: Unresolved reference: A package p diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt index 26ae96d08e3..358ad1b29a2 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun()")) fun oldFun(p: Int): Int { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt.after index 5aac156e32e..41611c181c2 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun()")) fun oldFun(p: Int): Int { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt index 929d17280d8..ec2d5fb4a2d 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun()")) fun oldFun(p: Int?): Int { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt.after index f68544db8fc..42e8c29f315 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun()")) fun oldFun(p: Int?): Int { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt index dc885ae33f5..0fae72b6c5f 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p2)")) fun oldFun(p1: Int, p2: Int): Boolean { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt.after index 4acd770c5b5..58383965659 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p2)")) fun oldFun(p1: Int, p2: Int): Boolean { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt index 6a93639b3a5..1c1c6313268 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME class C { @Deprecated("", ReplaceWith("newFun()")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt.after index 09d0863dd3b..a526017b6d4 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME class C { @Deprecated("", ReplaceWith("newFun()")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt index 58be8980542..2179edc1975 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME package ppp fun bar(): Int = 0 diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt.after index ae527089c02..ee8683d004c 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedShortenRefsRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME package ppp fun bar(): Int = 0 diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt index 4d8d04718d4..13f63f73a28 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p, p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p, p)")) fun oldFun(p: Int): Int { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt.after index 4d0a942ef8b..5ed11fd828d 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p, p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p, p)")) fun oldFun(p: Int): Int { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt index 6be2d0369df..cd78aed6246 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p, p)'" "true" +// WITH_RUNTIME import java.util.* diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt.after index 8c278a1e1b2..c51aaddfd78 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p, p)'" "true" +// WITH_RUNTIME import java.util.* diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt index db833ce0f26..fd2db09147e 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p, p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p, p)")) fun oldFun(p: Int?): Int { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt.after index f9009977292..feef277d665 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p, p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p, p)")) fun oldFun(p: Int?): Int { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt index 477b9b9a2f2..f669d89aa9c 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt @@ -1,4 +1,5 @@ // "Replace usages of 'myJavaClass(): Class' in whole project" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("T::class.java")) inline fun myJavaClass(): Class = T::class.java diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt.after index 28d5daf919a..9cacf74c1b2 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classLiteralAndTypeArgsRuntime.kt.after @@ -1,6 +1,7 @@ import java.util.Random // "Replace usages of 'myJavaClass(): Class' in whole project" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("T::class.java")) inline fun myJavaClass(): Class = T::class.java diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt index 79343c34089..c59d1af6a6f 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(this, s)'" "true" +// WITH_RUNTIME interface I { @Deprecated("", ReplaceWith("newFun(this, s)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt.after index 7c985f3888d..e5e28ba9032 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/implicitQualifiedThisRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(this, s)'" "true" +// WITH_RUNTIME interface I { @Deprecated("", ReplaceWith("newFun(this, s)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt index f2fc7904998..7b069d9425e 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun()")) fun Int.oldFun(): Int = this diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt.after index af1cc4c4c9e..6811d1690f0 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/keepLineBreaks/lineBreakAfterReceiverRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun()'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun()")) fun Int.oldFun(): Int = this diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt index 73e8bb2dbe7..f01912e83aa 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'c.newFun(this)'" "true" +// WITH_RUNTIME class X { @Deprecated("", ReplaceWith("c.newFun(this)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt.after index 1c6ec20b642..26053279cc8 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'c.newFun(this)'" "true" +// WITH_RUNTIME class X { @Deprecated("", ReplaceWith("c.newFun(this)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt index 86aaf439429..659af210b81 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 's.filter { it != c }'" "true" +// WITH_RUNTIME class X { @Deprecated("", ReplaceWith("s.filter { it != c }")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt.after index f54493e8bc4..a31dfd07930 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 's.filter { it != c }'" "true" +// WITH_RUNTIME class X { @Deprecated("", ReplaceWith("s.filter { it != c }")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt index 4d1939fdbc0..2615b87758c 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'c1.newFun(this, c2)'" "true" +// WITH_RUNTIME class X { @Deprecated("", ReplaceWith("c1.newFun(this, c2)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt.after index 40a98360680..7c60c3096f5 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'c1.newFun(this, c2)'" "true" +// WITH_RUNTIME class X { @Deprecated("", ReplaceWith("c1.newFun(this, c2)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt index 9b807a4ad44..d50813c6062 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'c1.newFun(this, c2)'" "true" +// WITH_RUNTIME class X(val c: Char) { @Deprecated("", ReplaceWith("c1.newFun(this, c2)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt.after index fb53686a27b..0a604dd459f 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'c1.newFun(this, c2)'" "true" +// WITH_RUNTIME class X(val c: Char) { @Deprecated("", ReplaceWith("c1.newFun(this, c2)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt index b01360eab7e..42b11d1a6ad 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 's.newFun(this)'" "true" +// WITH_RUNTIME class X { @Deprecated("", ReplaceWith("s.newFun(this)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt.after index 05866e229d1..6d9b17c30db 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 's.newFun(this)'" "true" +// WITH_RUNTIME class X { @Deprecated("", ReplaceWith("s.newFun(this)")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt index d595c5b649e..8c446dbf3b4 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*elements)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*elements)")) fun oldFun(vararg elements: T) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt.after index 0210182e101..fdc4273857b 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*elements)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*elements)")) fun oldFun(vararg elements: T) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt index c736e725ee5..f9fa39dd750 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(p: List) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt.after index 95447e690be..0d7713e0dc3 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(p: List) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt index ca6b823a7d1..66911ab0bc3 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*elements)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*elements)")) fun oldFun(vararg elements: T) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt.after index 659420b2e03..8ffb15cd09e 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/noImplicitTypeArgImportRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*elements)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*elements)")) fun oldFun(vararg elements: T) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt index adc4a5540e0..cf8515918c8 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*elements)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*elements)")) fun oldFun(vararg elements: T) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt.after index e90ce54658c..588a49a1c3f 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*elements)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*elements)")) fun oldFun(vararg elements: T) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt index eba4b84afe9..37033729880 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*p, x = null)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*p, x = null)")) fun oldFun(vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt.after index 690fb3b2840..7bd23c620f2 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*p, x = null)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*p, x = null)")) fun oldFun(vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt index b68d8f676c0..92147ef00e1 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*p, 1)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*p, 1)")) fun oldFun(vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt.after index 5ff06986c7b..630c68bd5fd 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*p, 1)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*p, 1)")) fun oldFun(vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt index efd0016f04a..26ac1fca872 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*p, *list.toIntArray())'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*p, *list.toIntArray())")) fun oldFun(list: List, vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt.after index 9cc7057685c..a8c8996a0b1 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*p, *list.toIntArray())'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*p, *list.toIntArray())")) fun oldFun(list: List, vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt index 7e344a1d36b..cc129d50c10 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Boolean){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt.after index a44028d2dbd..ccd3cd8c9ef 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Boolean){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt index 480eb8d21fb..e05526c17c2 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Byte){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt.after index 5109e659724..0ede019b6ba 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Byte){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt index 187801d4c93..df085788cfb 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*c)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*c)")) fun oldFun(vararg c: Char){} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt.after index d1417fae3d6..2957be57fcb 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*c)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*c)")) fun oldFun(vararg c: Char){} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt index 3c32fc9ff72..a233c68e3eb 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*c)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*c)")) fun oldFun(vararg c: Char){} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt.after index 7c34f9ca6de..726f459ffde 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*c)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*c)")) fun oldFun(vararg c: Char){} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt index 58d75b8803a..df9318b44a0 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME fun foo(vararg s: String) = s.joinToString() diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt.after index e9161e02de7..f56e06a1d81 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME fun foo(vararg s: String) = s.joinToString() diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt index f9c548d8dcb..056e1f25cd7 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Double){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt.after index b93ec7c59be..f9c08db42a0 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Double){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt index 0826f0f58fe..a94dc2e057e 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Float){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt.after index 933798f0d4d..ac28ea744f7 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Float){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt index a3b995d0395..04aebf99c14 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Long){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt.after index ff89a7f4e64..410dfbe080b 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Long){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt index 530add8de43..c3e29f5c2c5 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt.after index 05c18085780..c79c81aab96 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt index d350a0d8dff..b72229d6b96 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*p, 1)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*p, 1)")) fun oldFun(vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt.after index 7f8f58e5fc7..3723afdc829 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*p, 1)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*p, 1)")) fun oldFun(vararg p: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt index 4e609ba2e53..1a88486d329 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(*elements)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*elements)")) fun oldFun(vararg elements: java.io.File?) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt.after index 4cf023fe481..d5d7f9faf27 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/noImportRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(*elements)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(*elements)")) fun oldFun(vararg elements: java.io.File?) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt index 25f3234e36e..4a8d5e769f7 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Short){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt.after index 20df37b5629..4305520adfe 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p)")) fun oldFun(vararg p: Short){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt index e285ff08663..291f08e5205 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, *p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, *p2)")) fun oldFun(p1: String, vararg p2: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt.after index 95f816e3e8e..51e4e81039f 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, *p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, *p2)")) fun oldFun(p1: String, vararg p2: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt index 71187daf2c8..ec4111a20d9 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, *p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, *p2)")) fun oldFun(p1: String, vararg p2: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt.after index 6d3ba1d1acf..e9b5c5ae68c 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, *p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, *p2)")) fun oldFun(p1: String, vararg p2: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt index 7b178ac9ee1..11a9ef17532 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, *p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, *p2)")) fun oldFun(p1: String, vararg p2: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt.after index 83f3f4ee016..67fadcafabd 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, *p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, *p2)")) fun oldFun(p1: String, vararg p2: Int){ diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt index f245a4d0d31..00100fae640 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, p2)")) fun oldFun(p1: String, vararg p2: Int) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt.after index b47ff56ff6f..3b29c451b73 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, p2)")) fun oldFun(p1: String, vararg p2: Int) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt index e36bc9c8899..5a2b1feece3 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, *p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, *p2)")) fun oldFun(p1: String, p2: IntArray) { diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt.after index 84780161925..c38a554c42c 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt.after @@ -1,4 +1,5 @@ // "Replace with 'newFun(p1, *p2)'" "true" +// WITH_RUNTIME @Deprecated("", ReplaceWith("newFun(p1, *p2)")) fun oldFun(p1: String, p2: IntArray) { diff --git a/idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyWithDelegateRuntime.kt b/idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyWithDelegateRuntime.kt index fb2ac5ae7d6..53fc3fd8a7a 100644 --- a/idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyWithDelegateRuntime.kt +++ b/idea/testData/quickfix/initializeWithConstructorParameter/memberPropertyWithDelegateRuntime.kt @@ -2,6 +2,7 @@ // ACTION: Make internal // ACTION: Make private // ACTION: Make protected +// WITH_RUNTIME class A { val n: Int by lazy { 0 } } \ No newline at end of file diff --git a/idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt b/idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt index 84abab04983..103da0f759f 100644 --- a/idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt +++ b/idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt.after b/idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt.after index 985aaff3bc4..28adccdd628 100644 --- a/idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt.after +++ b/idea/testData/quickfix/migration/jsExternal/externalExtensionFunJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt b/idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt index 803069c4e42..e20d1a6d14b 100644 --- a/idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt +++ b/idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt.after b/idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt.after index faadf79ea37..1904e106bef 100644 --- a/idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt.after +++ b/idea/testData/quickfix/migration/jsExternal/externalExtensionFunParamsJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt b/idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt index 6f6db25faa6..3e6ae284a8b 100644 --- a/idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt +++ b/idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt.after b/idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt.after index 2a971ad90db..7a6206a5c09 100644 --- a/idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt.after +++ b/idea/testData/quickfix/migration/jsExternal/externalExtensionVarJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt index b05478e9669..a305ea8cb8a 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt +++ b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class TS diff --git a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt.after b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt.after index ea83f762241..7e3a344ed4d 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt.after +++ b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunBlockBodyJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class TS diff --git a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt index 2c4392b2a39..d011b024fb0 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt +++ b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt.after b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt.after index 454c3323678..497c5c91331 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt.after +++ b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt index 90aed5856d6..08c3abea0ca 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt +++ b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt.after b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt.after index 51b370e62f8..8e6e61963f1 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt.after +++ b/idea/testData/quickfix/migration/jsExternal/nativeExtensionFunParamsJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt b/idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt index e1e872a77a3..326966f298d 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt +++ b/idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt.after b/idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt.after index b264bbcfac3..9c44e2a46cf 100644 --- a/idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt.after +++ b/idea/testData/quickfix/migration/jsExternal/nativeExtensionVaslJsRuntime.kt.after @@ -1,4 +1,5 @@ // "Fix with 'asDynamic'" "true" +// JS class A diff --git a/idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt b/idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt index 3c7f108bdef..e3ee6d4b6aa 100644 --- a/idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt +++ b/idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt @@ -1,4 +1,5 @@ // "Use inherited visibility" "true" +// RUNTIME_WITH_FULL_JDK abstract class C : ClassLoader() { private override fun findClass(var1: String): Class<*> { throw ClassNotFoundException(var1) diff --git a/idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt.after b/idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt.after index 04c91f4108f..11cefc6b74d 100644 --- a/idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt.after +++ b/idea/testData/quickfix/modifiers/visibilityModiferOverrideJavaRuntime.kt.after @@ -1,4 +1,5 @@ // "Use inherited visibility" "true" +// RUNTIME_WITH_FULL_JDK abstract class C : ClassLoader() { override fun findClass(var1: String): Class<*> { throw ClassNotFoundException(var1) diff --git a/idea/testData/quickfix/moveToConstructorParameters/memberPropertyWithDelegateRuntime.kt b/idea/testData/quickfix/moveToConstructorParameters/memberPropertyWithDelegateRuntime.kt index c3af89c98d1..6c74f2f62b4 100644 --- a/idea/testData/quickfix/moveToConstructorParameters/memberPropertyWithDelegateRuntime.kt +++ b/idea/testData/quickfix/moveToConstructorParameters/memberPropertyWithDelegateRuntime.kt @@ -2,6 +2,7 @@ // ACTION: Make internal // ACTION: Make private // ACTION: Make protected +// WITH_RUNTIME class A { val n: Int by lazy { 0 } } \ No newline at end of file diff --git a/idea/testData/quickfix/removeSingleLambdaParameter/multiple.kt b/idea/testData/quickfix/removeSingleLambdaParameter/multiple.kt index 76d32ab8dda..55ca2f13ab8 100644 --- a/idea/testData/quickfix/removeSingleLambdaParameter/multiple.kt +++ b/idea/testData/quickfix/removeSingleLambdaParameter/multiple.kt @@ -3,7 +3,7 @@ // ACTION: Rename to _ // ACTION: Specify explicit lambda signature // ACTION: Specify type explicitly -// WITH_RUNTIME +// RUNTIME_WITH_FULL_JDK fun main() { mapOf(1 to 2).forEach { t, u -> println(t) } diff --git a/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt b/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt index fb86a568d46..b6f04efce7c 100644 --- a/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt +++ b/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt @@ -1,4 +1,5 @@ // "Remove '.java'" "true" +// WITH_RUNTIME 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 0aa61c2cc42..2bd4a5b3f1d 100644 --- a/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt.after +++ b/idea/testData/quickfix/typeInferenceExpectedTypeMismatch/convertClassToKClass1Runtime.kt.after @@ -1,4 +1,5 @@ // "Remove '.java'" "true" +// WITH_RUNTIME fun foo() { bar(Foo::class) } diff --git a/idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt b/idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt index 9b295e75922..95313a5fe36 100644 --- a/idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt +++ b/idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt @@ -1,4 +1,5 @@ // "Change type of 'f' to '(Delegates) -> Unit'" "true" +// WITH_RUNTIME fun foo() { var f: Int = { x: kotlin.properties.Delegates -> } diff --git a/idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt.after b/idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt.after index 36400684bbd..f21c1712b41 100644 --- a/idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt.after +++ b/idea/testData/quickfix/typeMismatch/propertyTypeMismatchLongNameRuntime.kt.after @@ -1,6 +1,7 @@ import kotlin.properties.Delegates // "Change type of 'f' to '(Delegates) -> Unit'" "true" +// WITH_RUNTIME fun foo() { var f: (Delegates) -> Unit = { x: kotlin.properties.Delegates -> } diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt index dd9ba59f6b0..5d204346833 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt @@ -1,4 +1,5 @@ // "Change return type of enclosing function 'foo' to 'Int'" "true" +// WITH_RUNTIME fun foo(n: Int): Boolean { n.let { return 1 diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt.after index 7acf74bedd6..a85e861aa61 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnRuntime.kt.after @@ -1,4 +1,5 @@ // "Change return type of enclosing function 'foo' to 'Int'" "true" +// WITH_RUNTIME fun foo(n: Int): Int { n.let { return 1 diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt index fc7bb3c00f1..10048fa4674 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt @@ -1,4 +1,5 @@ // "Change return type of enclosing function 'foo' to 'Int'" "true" +// WITH_RUNTIME fun foo(n: Int): Boolean { n.let { return@foo 1 diff --git a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt.after b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt.after index 0f238669fc7..e45ce0192ac 100644 --- a/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt.after +++ b/idea/testData/quickfix/typeMismatch/typeMismatchOnReturnedExpression/nonLocalReturnWithLabelRuntime.kt.after @@ -1,4 +1,5 @@ // "Change return type of enclosing function 'foo' to 'Int'" "true" +// WITH_RUNTIME fun foo(n: Int): Int { n.let { return@foo 1 diff --git a/idea/tests/org/jetbrains/kotlin/idea/KotlinLightQuickFixTestCase.java b/idea/tests/org/jetbrains/kotlin/idea/KotlinLightQuickFixTestCase.java deleted file mode 100644 index 29517accd18..00000000000 --- a/idea/tests/org/jetbrains/kotlin/idea/KotlinLightQuickFixTestCase.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2010-2015 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.jetbrains.kotlin.idea; - -import com.intellij.codeInsight.daemon.quickFix.LightQuickFixTestCase; -import com.intellij.openapi.vfs.newvfs.impl.VfsRootAccess; -import org.jetbrains.kotlin.idea.test.RunnableWithException; -import org.jetbrains.kotlin.idea.test.TestUtilsKt; -import org.jetbrains.kotlin.test.KotlinTestUtils; - -abstract public class KotlinLightQuickFixTestCase extends LightQuickFixTestCase { - @Override - protected void setUp() throws Exception { - super.setUp(); - VfsRootAccess.allowRootAccess(KotlinTestUtils.getHomeDirectory()); - TestUtilsKt.invalidateLibraryCache(getProject()); - } - - @Override - protected void tearDown() throws Exception { - VfsRootAccess.disallowRootAccess(KotlinTestUtils.getHomeDirectory()); - - TestUtilsKt.doKotlinTearDown(getProject(), new RunnableWithException() { - @Override - public void run() throws Exception { - KotlinLightQuickFixTestCase.super.tearDown(); - } - }); - } -} diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixTest.kt b/idea/tests/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixTest.kt index 324f139ea03..3f60a98f29f 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/AbstractQuickFixTest.kt @@ -17,112 +17,64 @@ package org.jetbrains.kotlin.idea.quickfix import com.intellij.codeInsight.daemon.quickFix.ActionHint -import com.intellij.codeInsight.daemon.quickFix.LightQuickFixTestCase -import com.intellij.codeInsight.daemon.quickFix.QuickFixTestCase import com.intellij.codeInsight.intention.IntentionAction import com.intellij.codeInspection.InspectionProfileEntry import com.intellij.codeInspection.LocalInspectionTool import com.intellij.codeInspection.SuppressableProblemGroup -import com.intellij.ide.startup.impl.StartupManagerImpl import com.intellij.openapi.command.CommandProcessor -import com.intellij.openapi.projectRoots.JavaSdk -import com.intellij.openapi.projectRoots.Sdk -import com.intellij.openapi.startup.StartupManager import com.intellij.openapi.util.io.FileUtil import com.intellij.openapi.util.text.StringUtil import com.intellij.openapi.vfs.CharsetToolkit -import com.intellij.psi.stubs.StubUpdatingIndex import com.intellij.rt.execution.junit.FileComparisonFailure import com.intellij.testFramework.InspectionTestUtil -import com.intellij.testFramework.LightPlatformCodeInsightTestCase import com.intellij.testFramework.LightPlatformTestCase +import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.UsefulTestCase -import com.intellij.util.ArrayUtil -import com.intellij.util.ObjectUtils.notNull -import com.intellij.util.indexing.FileBasedIndex +import com.intellij.util.ui.UIUtil import junit.framework.TestCase -import org.apache.commons.lang.SystemUtils -import org.jetbrains.kotlin.idea.KotlinLightQuickFixTestCase import org.jetbrains.kotlin.idea.quickfix.utils.findInspectionFile -import org.jetbrains.kotlin.idea.test.ConfigLibraryUtil -import org.jetbrains.kotlin.idea.test.DirectiveBasedActionUtils -import org.jetbrains.kotlin.idea.test.PluginTestCaseBase -import org.jetbrains.kotlin.idea.test.TestFixtureExtension +import org.jetbrains.kotlin.idea.test.* import org.jetbrains.kotlin.psi.KtFile import org.jetbrains.kotlin.test.InTextDirectivesUtils -import org.jetbrains.kotlin.test.KotlinTestUtils import org.junit.Assert import java.io.File -import java.io.IOException -import java.nio.charset.Charset -import java.util.* - -abstract class AbstractQuickFixTest : KotlinLightQuickFixTestCase() { - @Throws(Exception::class) - override fun setUp() { - super.setUp() - (StartupManager.getInstance(LightPlatformTestCase.getProject()) as StartupManagerImpl).runPostStartupActivities() - } +abstract class AbstractQuickFixTest : KotlinLightCodeInsightFixtureTestCase() { @Throws(Exception::class) protected fun doTest(beforeFileName: String) { - try { - configureRuntimeIfNeeded(beforeFileName) + enableInspections(beforeFileName) - enableInspections(beforeFileName) + doKotlinQuickFixTest(beforeFileName) + checkForUnexpectedErrors() + } - doSingleTest(getTestName(false) + ".kt") - checkForUnexpectedErrors() - } - finally { - unConfigureRuntimeIfNeeded(beforeFileName) + override fun getProjectDescriptor(): LightProjectDescriptor { + if ("createfromusage" in testDataPath.toLowerCase()) { + return KotlinWithJdkAndRuntimeLightProjectDescriptor.INSTANCE } + return super.getProjectDescriptor() } - //region Severe hack - lot of code copied from LightQuickFixTestCase to workaround stupid format of test data with before/after prefixes - override fun doSingleTest(fileSuffix: String) { - doKotlinQuickFixTest(fileSuffix, createWrapper()) - } + override val captureExceptions: Boolean + get() = false - override fun shouldBeAvailableAfterExecution(): Boolean { - return InTextDirectivesUtils.isDirectiveDefined(myWrapper!!.file.text, "// SHOULD_BE_AVAILABLE_AFTER_EXECUTION") - } - - override fun configureLocalInspectionTools(): Array { - if (KotlinTestUtils.isAllFilesPresentTest(getTestName(false))) return super.configureLocalInspectionTools() - - val testRoot = KotlinTestUtils.getTestsRoot(this.javaClass) - val configFileText = File(testRoot, getTestName(true) + ".kt").readText(Charset.defaultCharset()) - val toolsStrings = InTextDirectivesUtils.findListWithPrefixes(configFileText, "TOOL:") - - if (toolsStrings.isEmpty()) return super.configureLocalInspectionTools() - - return ArrayUtil.toObjectArray(toolsStrings.map { toolFqName -> - try { - val aClass = Class.forName(toolFqName) - return@map aClass.newInstance() as LocalInspectionTool - } - catch (e: Exception) { - throw IllegalArgumentException("Failed to create inspection for key '$toolFqName'", e) - } - }, LocalInspectionTool::class.java) + fun shouldBeAvailableAfterExecution(): Boolean { + return InTextDirectivesUtils.isDirectiveDefined(myFixture.file.text, "// SHOULD_BE_AVAILABLE_AFTER_EXECUTION") } protected open fun configExtra(options: String) { } - private fun doKotlinQuickFixTest(testName: String, quickFixTestCase: QuickFixTestCase) { - val relativePath = notNull(quickFixTestCase.basePath, "") + "/" + testName.decapitalize() - val testFullPath = quickFixTestCase.testDataPath.replace(File.separatorChar, '/') + relativePath - val testFile = File(testFullPath) - CommandProcessor.getInstance().executeCommand(quickFixTestCase.project, { + private fun doKotlinQuickFixTest(beforeFileName: String) { + val testFile = File(beforeFileName) + CommandProcessor.getInstance().executeCommand(project, { var fileText = "" var expectedErrorMessage: String? = "" var fixtureClasses = emptyList() try { fileText = FileUtil.loadFile(testFile, CharsetToolkit.UTF8_CHARSET) - TestCase.assertTrue("\"\" is missing in file \"$testName\"", fileText.contains("")) + TestCase.assertTrue("\"\" is missing in file \"${testFile.path}\"", fileText.contains("")) fixtureClasses = InTextDirectivesUtils.findListWithPrefixes(fileText, "// FIXTURE_CLASS: ") for (fixtureClass in fixtureClasses) { @@ -131,14 +83,13 @@ abstract class AbstractQuickFixTest : KotlinLightQuickFixTestCase() { expectedErrorMessage = InTextDirectivesUtils.findStringWithPrefixes(fileText, "// SHOULD_FAIL_WITH: ") val contents = StringUtil.convertLineSeparators(fileText) - quickFixTestCase.configureFromFileText(testFile.name, contents) - quickFixTestCase.bringRealEditorBack() + myFixture.configureByText(testFile.canonicalFile.name, contents) checkForUnexpectedActions() configExtra(fileText) - applyAction(contents, quickFixTestCase, testName, testFullPath) + applyAction(contents, testFile.canonicalPath) UsefulTestCase.assertEmpty(expectedErrorMessage) } @@ -151,60 +102,76 @@ abstract class AbstractQuickFixTest : KotlinLightQuickFixTestCase() { catch (e: Throwable) { if (expectedErrorMessage == null || expectedErrorMessage != e.message) { e.printStackTrace() - TestCase.fail(testName) + TestCase.fail(getTestName(true)) } } finally { for (fixtureClass in fixtureClasses) { TestFixtureExtension.unloadFixture(fixtureClass) } - ConfigLibraryUtil.unconfigureLibrariesByDirective(LightPlatformTestCase.getModule(), fileText) + ConfigLibraryUtil.unconfigureLibrariesByDirective(myFixture.module, fileText) } }, "", "") } - @Throws(Exception::class) - override fun doAction(actionHint: ActionHint, testFullPath: String, testName: String) { - LightQuickFixTestCase.doAction(actionHint, testFullPath, testName, myWrapper!!) - } + private fun applyAction(contents: String, testFullPath: String) { + val fileName = testFullPath.substringAfterLast("/", "") + val actionHint = ActionHint.parse(myFixture.file, contents.replace("\${file}", fileName, ignoreCase = true)) + val intention = findActionWithText(actionHint.expectedText) + if (actionHint.shouldPresent()) { + if (intention == null) { + fail("Action with text '" + actionHint.expectedText + "' not found\nAvailable actions: " + + myFixture.availableIntentions.joinToString(prefix = "[", postfix = "]") { it.text }) + } + myFixture.launchAction(intention!!) + UIUtil.dispatchAllInvocationEvents() + UIUtil.dispatchAllInvocationEvents() - override fun checkResultByFile(message: String?, filePath: String, ignoreTrailingSpaces: Boolean) { - val file = File(filePath) - val afterFileName = file.name - assert(afterFileName.startsWith(LightQuickFixTestCase.AFTER_PREFIX)) - val newAfterFileName = afterFileName.substring(LightQuickFixTestCase.AFTER_PREFIX.length).decapitalize() + ".after" + if (!shouldBeAvailableAfterExecution()) { + assertNull("Action '${actionHint.expectedText}' is still available after its invocation in test " + testFullPath, + findActionWithText(actionHint.expectedText)) + } - super.checkResultByFile(message, File(file.parent, newAfterFileName).path, ignoreTrailingSpaces) - } - - @Throws(IOException::class) - private fun unConfigureRuntimeIfNeeded(beforeFileName: String) { - if (beforeFileName.endsWith("JsRuntime.kt")) { - ConfigLibraryUtil.unConfigureKotlinJsRuntimeAndSdk(LightPlatformTestCase.getModule(), projectJDK) + myFixture.checkResultByFile(File(testFullPath).name + ".after") } - else if (isRuntimeNeeded(beforeFileName)) { - ConfigLibraryUtil.unConfigureKotlinRuntimeAndSdk(LightPlatformTestCase.getModule(), projectJDK) + else { + assertNull("Action with text ${actionHint.expectedText} is present, but should not", intention) } } - @Throws(IOException::class, ClassNotFoundException::class) private fun enableInspections(beforeFileName: String) { + val beforeFileText = FileUtil.loadFile(File(beforeFileName)) + val toolsStrings = InTextDirectivesUtils.findListWithPrefixes(beforeFileText, "TOOL:") + if (toolsStrings.isNotEmpty()) { + val inspections = toolsStrings.map { toolFqName -> + try { + val aClass = Class.forName(toolFqName) + return@map aClass.newInstance() as LocalInspectionTool + } + catch (e: Exception) { + throw IllegalArgumentException("Failed to create inspection for key '$toolFqName'", e) + } + } + myFixture.enableInspections(*inspections.toTypedArray()) + return + } + val inspectionFile = findInspectionFile(File(beforeFileName).parentFile) if (inspectionFile != null) { val className = FileUtil.loadFile(inspectionFile).trim { it <= ' ' } val inspectionClass = Class.forName(className) as Class val tools = InspectionTestUtil.instantiateTools( listOf>(inspectionClass)) - enableInspectionTools(tools[0]) + myFixture.enableInspections(*tools.toTypedArray()) } } @Throws(ClassNotFoundException::class) private fun checkForUnexpectedActions() { - val text = LightPlatformCodeInsightTestCase.getEditor().getDocument().getText() - val actionHint = ActionHint.parse(LightPlatformCodeInsightTestCase.getFile(), text) + val text = myFixture.editor.document.text + val actionHint = ActionHint.parse(myFixture.file, text) if (!actionHint.shouldPresent()) { - val actions = availableActions + val actions = myFixture.availableIntentions val prefix = "class " if (actionHint.expectedText.startsWith(prefix)) { @@ -229,22 +196,22 @@ abstract class AbstractQuickFixTest : KotlinLightQuickFixTestCase() { } else { // Action shouldn't be found. Check that other actions are expected and thus tested action isn't there under another name. - DirectiveBasedActionUtils.checkAvailableActionsAreExpected(LightPlatformCodeInsightTestCase.getFile(), actions) + DirectiveBasedActionUtils.checkAvailableActionsAreExpected(myFixture.file, actions) } } } - override fun findActionWithText(text: String): IntentionAction? { - val intention = super.findActionWithText(text) - if (intention != null) return intention + fun findActionWithText(text: String): IntentionAction? { + val intentions = myFixture.availableIntentions.filter { it.text == text } + if (intentions.isNotEmpty()) return intentions.first() // Support warning suppression - val caretOffset = LightPlatformCodeInsightTestCase.myEditor.getCaretModel().getOffset() - for (highlight in doHighlighting()) { + val caretOffset = myFixture.caretOffset + for (highlight in myFixture.doHighlighting()) { if (highlight.startOffset <= caretOffset && caretOffset <= highlight.endOffset) { val group = highlight.problemGroup if (group is SuppressableProblemGroup) { - val at = LightPlatformCodeInsightTestCase.getFile().findElementAt(highlight.actualStartOffset) + val at = myFixture.file.findElementAt(highlight.actualStartOffset) val actions = group.getSuppressActions(at) for (action in actions) { if (action.text == text) { @@ -257,72 +224,7 @@ abstract class AbstractQuickFixTest : KotlinLightQuickFixTestCase() { return null } - override fun checkResultByText(message: String?, fileText: String, ignoreTrailingSpaces: Boolean, filePath: String?) { - super.checkResultByText(message, fileText, ignoreTrailingSpaces, File(filePath!!).absolutePath) - } - - override fun getBasePath(): String { - return KotlinTestUtils.getTestsRoot(javaClass) - } - - override fun getTestDataPath(): String { - return "./" - } - - override fun getProjectJDK(): Sdk { - return PluginTestCaseBase.mockJdk() - } - - companion object { - - private var myWrapper: QuickFixTestCase? = null - - @Throws(Exception::class) - private fun applyAction(contents: String, quickFixTestCase: QuickFixTestCase, testName: String, testFullPath: String) { - val fileName = testFullPath.substringAfterLast("/", "") - val actionHint = ActionHint.parse(quickFixTestCase.file, contents.replace("\${file}", fileName)) - - quickFixTestCase.beforeActionStarted(testName, contents) - - try { - myWrapper = quickFixTestCase - quickFixTestCase.doAction(actionHint, testFullPath, testName) - } - finally { - myWrapper = null - quickFixTestCase.afterActionCompleted(testName, contents) - } - } - //endregion - - @Throws(IOException::class) - private fun configureRuntimeIfNeeded(beforeFileName: String) { - if (beforeFileName.endsWith("JsRuntime.kt")) { - // Without the following line of code subsequent tests with js-runtime will be prone to failure due "outdated stub in index" error. - FileBasedIndex.getInstance().requestRebuild(StubUpdatingIndex.INDEX_ID) - - ConfigLibraryUtil.configureKotlinJsRuntimeAndSdk(LightPlatformTestCase.getModule(), fullJavaJDK) - } - else if (isRuntimeNeeded(beforeFileName)) { - ConfigLibraryUtil.configureKotlinRuntimeAndSdk(LightPlatformTestCase.getModule(), fullJavaJDK) - } - else if (beforeFileName.contains("Runtime") || beforeFileName.contains("JsRuntime")) { - Assert.fail("Runtime marker is used in test name, but not in test file end. " + "This can lead to false-positive absent of actions") - } - } - - @Throws(IOException::class) - private fun isRuntimeNeeded(beforeFileName: String): Boolean { - return beforeFileName.endsWith("Runtime.kt") || - beforeFileName.toLowerCase().contains("createfromusage") || - InTextDirectivesUtils.isDirectiveDefined(FileUtil.loadFile(File(beforeFileName)), "WITH_RUNTIME") - } - - fun checkForUnexpectedErrors() { - DirectiveBasedActionUtils.checkForUnexpectedErrors(LightPlatformCodeInsightTestCase.getFile() as KtFile) - } - - protected val fullJavaJDK: Sdk - get() = JavaSdk.getInstance().createJdk("JDK", SystemUtils.getJavaHome().absolutePath) + fun checkForUnexpectedErrors() { + DirectiveBasedActionUtils.checkForUnexpectedErrors(myFixture.file as KtFile) } } diff --git a/ultimate/tests/org/jetbrains/kotlin/idea/spring/tests/quickfixes/AbstractSpringQuickFixTest.kt b/ultimate/tests/org/jetbrains/kotlin/idea/spring/tests/quickfixes/AbstractSpringQuickFixTest.kt index 50c908efec4..41a62b4e175 100644 --- a/ultimate/tests/org/jetbrains/kotlin/idea/spring/tests/quickfixes/AbstractSpringQuickFixTest.kt +++ b/ultimate/tests/org/jetbrains/kotlin/idea/spring/tests/quickfixes/AbstractSpringQuickFixTest.kt @@ -5,6 +5,6 @@ import org.jetbrains.kotlin.idea.spring.tests.configureSpringFileSetByDirective abstract class AbstractSpringQuickFixTest : AbstractQuickFixTest() { override fun configExtra(options: String) { - configureSpringFileSetByDirective(getModule(), options, listOf(getFile())) + configureSpringFileSetByDirective(module, options, listOf(getFile())) } } \ No newline at end of file