diff --git a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetCallExpression.java b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetCallExpression.java index 6fe25326edf..c13a4abfc88 100644 --- a/compiler/frontend/src/org/jetbrains/kotlin/psi/JetCallExpression.java +++ b/compiler/frontend/src/org/jetbrains/kotlin/psi/JetCallExpression.java @@ -66,14 +66,14 @@ public class JetCallExpression extends JetExpressionImpl implements JetCallEleme @Override @NotNull - public List getValueArguments() { + public List getValueArguments() { JetValueArgumentList list = getValueArgumentList(); List valueArgumentsInParentheses = list != null ? list.getArguments() : Collections.emptyList(); List functionLiteralArguments = getFunctionLiteralArguments(); if (functionLiteralArguments.isEmpty()) { return valueArgumentsInParentheses; } - List allValueArguments = Lists.newArrayList(); + List allValueArguments = Lists.newArrayList(); allValueArguments.addAll(valueArgumentsInParentheses); allValueArguments.addAll(functionLiteralArguments); return allValueArguments; diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt index 62700e709a4..83cbf1c6604 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixBase.kt @@ -22,6 +22,7 @@ import com.intellij.openapi.util.Key import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile import org.jetbrains.kotlin.analyzer.analyzeInContext +import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.CallableDescriptor import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ValueParameterDescriptor @@ -40,8 +41,12 @@ import org.jetbrains.kotlin.lexer.JetTokens import org.jetbrains.kotlin.name.Name import org.jetbrains.kotlin.name.renderName import org.jetbrains.kotlin.psi.* -import org.jetbrains.kotlin.psi.psiUtil.* +import org.jetbrains.kotlin.psi.psiUtil.collectDescendantsOfType +import org.jetbrains.kotlin.psi.psiUtil.forEachDescendantOfType +import org.jetbrains.kotlin.psi.psiUtil.getReceiverExpression +import org.jetbrains.kotlin.psi.psiUtil.isAncestor import org.jetbrains.kotlin.resolve.BindingContext +import org.jetbrains.kotlin.resolve.CompileTimeConstantUtils import org.jetbrains.kotlin.resolve.DescriptorUtils import org.jetbrains.kotlin.resolve.bindingContextUtil.getDataFlowInfo import org.jetbrains.kotlin.resolve.bindingContextUtil.isUsedAsExpression @@ -53,6 +58,7 @@ import org.jetbrains.kotlin.resolve.calls.model.VarargValueArgument import org.jetbrains.kotlin.resolve.constants.CompileTimeConstant import org.jetbrains.kotlin.resolve.descriptorUtil.builtIns import org.jetbrains.kotlin.resolve.descriptorUtil.isExtension +import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode import org.jetbrains.kotlin.resolve.scopes.receivers.ThisReceiver import org.jetbrains.kotlin.types.ErrorUtils import org.jetbrains.kotlin.types.JetType @@ -177,6 +183,8 @@ public abstract class DeprecatedSymbolUsageFixBase( val usages = expression.collectDescendantsOfType { it[PARAMETER_USAGE_KEY] == originalParameter } usages.forEach { it.replace(argument.wrapped) } + //TODO: sometimes we need to add explicit type arguments here because we don't have expected type in the new context + if (argument.expression.shouldKeepValue(usages.size())) { introduceValuesForParameters.add(IntroduceValueForParameter(parameter, argument.expression, argument.expressionType)) } @@ -231,6 +239,8 @@ public abstract class DeprecatedSymbolUsageFixBase( } result = ShortenReferences({ ShortenReferences.Options(removeThis = true) }).process(result, shortenFilter) as JetExpression + simplifySpreadArrayOfArguments(result) + // clean up user data result.forEachDescendantOfType { it.clear(USER_CODE_KEY) @@ -433,7 +443,29 @@ public abstract class DeprecatedSymbolUsageFixBase( return Argument(wrapped.getExpression()!!, wrapped, null/*TODO*/, isDefaultValue = true) } - is VarargValueArgument -> /*TODO*/ return null + is VarargValueArgument -> { + val arguments = resolvedArgument.getArguments() + val single = arguments.singleOrNull() + if (single != null && single.getSpreadElement() != null) { + val expression = single.getArgumentExpression()!!.marked(USER_CODE_KEY) + return Argument(expression, expression, bindingContext.getType(expression), isDefaultValue = false) + } + + val elementType = parameter.getVarargElementType()!! + val expression = JetPsiFactory(project).buildExpression { + appendFixedText(arrayOfFunctionName(elementType)) + appendFixedText("(") + for ((i, argument) in arguments.withIndex()) { + if (i > 0) appendFixedText(",") + if (argument.getSpreadElement() != null) { + appendFixedText("*") + } + appendExpression(argument.getArgumentExpression()!!.marked(USER_CODE_KEY)) + } + appendFixedText(")") + } + return Argument(expression, expression, parameter.getType(), isDefaultValue = false) + } else -> error("Unknown argument type: $resolvedArgument") } @@ -480,6 +512,67 @@ public abstract class DeprecatedSymbolUsageFixBase( values.forEach { it.unwrap() } } + private fun arrayOfFunctionName(elementType: JetType): String { + return when { + KotlinBuiltIns.isInt(elementType) -> "kotlin.intArrayOf" + KotlinBuiltIns.isLong(elementType) -> "kotlin.longArrayOf" + KotlinBuiltIns.isShort(elementType) -> "kotlin.shortArrayOf" + KotlinBuiltIns.isChar(elementType) -> "kotlin.charArrayOf" + KotlinBuiltIns.isBoolean(elementType) -> "kotlin.booleanArrayOf" + KotlinBuiltIns.isByte(elementType) -> "kotlin.byteArrayOf" + KotlinBuiltIns.isDouble(elementType) -> "kotlin.doubleArrayOf" + KotlinBuiltIns.isFloat(elementType) -> "kotlin.floatArrayOf" + elementType.isError() -> "kotlin.arrayOf" + else -> "kotlin.arrayOf<" + IdeDescriptorRenderers.SOURCE_CODE.renderType(elementType) + ">" + } + } + + private fun simplifySpreadArrayOfArguments(expression: JetExpression) { + //TODO: test for nested + + val argumentsToExpand = ArrayList>>() + + expression.accept(object : JetTreeVisitorVoid() { + override fun visitArgument(argument: JetValueArgument) { + super.visitArgument(argument) + + if (argument.getSpreadElement() != null && !argument.isNamed()) { + val call = argument.getArgumentExpression() as? JetCallExpression + if (call != null) { + val resolvedCall = call.getResolvedCall(call.analyze(BodyResolveMode.PARTIAL)) + if (resolvedCall != null && CompileTimeConstantUtils.isArrayMethodCall(resolvedCall)) { + argumentsToExpand.add(argument to call.getValueArguments()) + } + } + } + } + + override fun visitJetElement(element: JetElement) { + if (!element[USER_CODE_KEY]) { // do not go inside original user's code + super.visitJetElement(element) + } + } + }) + + for ((argument, replacements) in argumentsToExpand) { + argument.replaceByMultiple(replacements) + } + } + + private fun JetValueArgument.replaceByMultiple(arguments: Collection) { + val list = getParent() as JetValueArgumentList + if (arguments.isEmpty()) { + list.removeArgument(this) + } + else { + var anchor = this + for (argument in arguments) { + anchor = list.addArgumentAfter(argument, anchor) + } + list.removeArgument(this) + } + } + //TODO: making functions below private causes VerifyError fun PsiElement.get(key: Key): T? = getCopyableUserData(key) fun PsiElement.get(key: Key): Boolean = getCopyableUserData(key) != null diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt new file mode 100644 index 00000000000..a33d23df8b8 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(*p, x = null)'" "true" + +@deprecated("", ReplaceWith("newFun(*p, x = null)")) +fun oldFun(vararg p: Int){ + newFun(*p, x = null) +} + +fun newFun(vararg p: Int, x: String? = ""){} + +fun foo() { + oldFun(1, 2, 3) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt.after new file mode 100644 index 00000000000..71387aa70ca --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(*p, x = null)'" "true" + +@deprecated("", ReplaceWith("newFun(*p, x = null)")) +fun oldFun(vararg p: Int){ + newFun(*p, x = null) +} + +fun newFun(vararg p: Int, x: String? = ""){} + +fun foo() { + newFun(1, 2, 3, x = null) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt new file mode 100644 index 00000000000..8d7cc7cfc96 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(*p, 1)'" "true" + +@deprecated("", ReplaceWith("newFun(*p, 1)")) +fun oldFun(vararg p: Int){ + newFun(*p, 1) +} + +fun newFun(vararg p: Int){} + +fun foo() { + oldFun(1, 2, 3) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt.after new file mode 100644 index 00000000000..4661da05d8d --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(*p, 1)'" "true" + +@deprecated("", ReplaceWith("newFun(*p, 1)")) +fun oldFun(vararg p: Int){ + newFun(*p, 1) +} + +fun newFun(vararg p: Int){} + +fun foo() { + newFun(1, 2, 3, 1) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt new file mode 100644 index 00000000000..dffcddee672 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(*p, *list.toIntArray())'" "true" + +@deprecated("", ReplaceWith("newFun(*p, *list.toIntArray())")) +fun oldFun(list: List, vararg p: Int){ + newFun(*p, *list.toIntArray()) +} + +fun newFun(vararg p: Int){} + +fun foo(list: List) { + oldFun(list, 1, 2, 3) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt.after new file mode 100644 index 00000000000..0172223a6e1 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(*p, *list.toIntArray())'" "true" + +@deprecated("", ReplaceWith("newFun(*p, *list.toIntArray())")) +fun oldFun(list: List, vararg p: Int){ + newFun(*p, *list.toIntArray()) +} + +fun newFun(vararg p: Int){} + +fun foo(list: List) { + newFun(1, 2, 3, *list.toIntArray()) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt new file mode 100644 index 00000000000..7674fcd5a8c --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Boolean){ + newFun(p) +} + +fun newFun(p: BooleanArray){} + +fun foo() { + oldFun(true, false) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt.after new file mode 100644 index 00000000000..b68237ecaf7 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Boolean){ + newFun(p) +} + +fun newFun(p: BooleanArray){} + +fun foo() { + newFun(booleanArrayOf(true, false)) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt new file mode 100644 index 00000000000..959e5d58d66 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Byte){ + newFun(p) +} + +fun newFun(p: ByteArray){} + +fun foo() { + oldFun(1, 2, 3) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt.after new file mode 100644 index 00000000000..c969b5d34c4 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Byte){ + newFun(p) +} + +fun newFun(p: ByteArray){} + +fun foo() { + newFun(byteArrayOf(1, 2, 3)) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt new file mode 100644 index 00000000000..25fb86fbdf6 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt @@ -0,0 +1,10 @@ +// "Replace with 'newFun(*c)'" "true" + +@deprecated("", ReplaceWith("newFun(*c)")) +fun oldFun(vararg c: Char){} + +fun newFun(vararg c: Char){} + +fun foo() { + oldFun(*listOf(java.io.File.separatorChar).toCharArray()) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt.after new file mode 100644 index 00000000000..283147bfbec --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt.after @@ -0,0 +1,10 @@ +// "Replace with 'newFun(*c)'" "true" + +@deprecated("", ReplaceWith("newFun(*c)")) +fun oldFun(vararg c: Char){} + +fun newFun(vararg c: Char){} + +fun foo() { + newFun(*listOf(java.io.File.separatorChar).toCharArray()) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt new file mode 100644 index 00000000000..6e5d094f2bd --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt @@ -0,0 +1,10 @@ +// "Replace with 'newFun(*c)'" "true" + +@deprecated("", ReplaceWith("newFun(*c)")) +fun oldFun(vararg c: Char){} + +fun newFun(vararg c: Char){} + +fun foo() { + oldFun(java.io.File.separatorChar) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt.after new file mode 100644 index 00000000000..6749eac93b9 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt.after @@ -0,0 +1,10 @@ +// "Replace with 'newFun(*c)'" "true" + +@deprecated("", ReplaceWith("newFun(*c)")) +fun oldFun(vararg c: Char){} + +fun newFun(vararg c: Char){} + +fun foo() { + newFun(java.io.File.separatorChar) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt new file mode 100644 index 00000000000..ae2f597cbd1 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt @@ -0,0 +1,14 @@ +// "Replace with 'newFun(p)'" "true" + +fun foo(vararg s: String) = s.joinToString() + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(p: String){ + newFun(p) +} + +fun newFun(p: String){} + +fun foo() { + oldFun(foo(*arrayOf("a", "b"))) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt.after new file mode 100644 index 00000000000..a39c50e7f62 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt.after @@ -0,0 +1,14 @@ +// "Replace with 'newFun(p)'" "true" + +fun foo(vararg s: String) = s.joinToString() + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(p: String){ + newFun(p) +} + +fun newFun(p: String){} + +fun foo() { + newFun(foo(*arrayOf("a", "b"))) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt new file mode 100644 index 00000000000..22e6da27097 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Double){ + newFun(p) +} + +fun newFun(p: DoubleArray){} + +fun foo() { + oldFun(1.0, 2.0) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt.after new file mode 100644 index 00000000000..4684ce36908 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Double){ + newFun(p) +} + +fun newFun(p: DoubleArray){} + +fun foo() { + newFun(doubleArrayOf(1.0, 2.0)) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt new file mode 100644 index 00000000000..f1ece135921 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Float){ + newFun(p) +} + +fun newFun(p: FloatArray){} + +fun foo() { + oldFun(1f) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt.after new file mode 100644 index 00000000000..250244fa80f --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Float){ + newFun(p) +} + +fun newFun(p: FloatArray){} + +fun foo() { + newFun(floatArrayOf(1f)) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt new file mode 100644 index 00000000000..3cb8e87e537 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Long){ + newFun(p) +} + +fun newFun(p: LongArray){} + +fun foo() { + oldFun(1L) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt.after new file mode 100644 index 00000000000..c99dcb1885d --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Long){ + newFun(p) +} + +fun newFun(p: LongArray){} + +fun foo() { + newFun(longArrayOf(1L)) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt new file mode 100644 index 00000000000..5ba685d884d --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Int){ + newFun(p) +} + +fun newFun(p: IntArray){} + +fun foo(list1: List,list2: List) { + oldFun(*list1.toIntArray(), 0, *list2.toIntArray()) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt.after new file mode 100644 index 00000000000..36012150ef9 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Int){ + newFun(p) +} + +fun newFun(p: IntArray){} + +fun foo(list1: List,list2: List) { + newFun(intArrayOf(*list1.toIntArray(), 0, *list2.toIntArray())) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt new file mode 100644 index 00000000000..e397612ee2d --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(*p, 1)'" "true" + +@deprecated("", ReplaceWith("newFun(*p, 1)")) +fun oldFun(vararg p: Int){ + newFun(*p, 1) +} + +fun newFun(vararg p: Int){} + +fun foo(list1: List,list2: List) { + oldFun(*list1.toIntArray(), 0, *list2.toIntArray()) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt.after new file mode 100644 index 00000000000..963de275174 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(*p, 1)'" "true" + +@deprecated("", ReplaceWith("newFun(*p, 1)")) +fun oldFun(vararg p: Int){ + newFun(*p, 1) +} + +fun newFun(vararg p: Int){} + +fun foo(list1: List,list2: List) { + newFun(*list1.toIntArray(), 0, *list2.toIntArray(), 1) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt new file mode 100644 index 00000000000..118b2e9e9c5 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Short){ + newFun(p) +} + +fun newFun(p: ShortArray){} + +fun foo() { + oldFun(1) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt.after new file mode 100644 index 00000000000..16d16bf2c8a --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p)'" "true" + +@deprecated("", ReplaceWith("newFun(p)")) +fun oldFun(vararg p: Short){ + newFun(p) +} + +fun newFun(p: ShortArray){} + +fun foo() { + newFun(shortArrayOf(1)) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt new file mode 100644 index 00000000000..2a65649a1b8 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, vararg p2: Int){ + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo() { + oldFun("a") +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt.after new file mode 100644 index 00000000000..0ccc5a35152 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, vararg p2: Int){ + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo() { + newFun("a") +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt new file mode 100644 index 00000000000..5b0d81341a0 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, vararg p2: Int){ + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo() { + oldFun("a", 1) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt.after new file mode 100644 index 00000000000..1f8d2a80ca9 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, vararg p2: Int){ + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo() { + newFun("a", 1) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt new file mode 100644 index 00000000000..778e2963149 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, vararg p2: Int){ + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo() { + oldFun("a", 1, 2, 3) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt.after new file mode 100644 index 00000000000..1cd16334099 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, vararg p2: Int){ + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo() { + newFun("a", 1, 2, 3) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt new file mode 100644 index 00000000000..4a3dc7501ca --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, vararg p2: Int){ + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo(array: IntArray) { + oldFun("a", *array) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt.after new file mode 100644 index 00000000000..147b1576762 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, vararg p2: Int){ + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo(array: IntArray) { + newFun("a", *array) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt new file mode 100644 index 00000000000..b3146778a11 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, p2)")) +fun oldFun(p1: String, vararg p2: Int) { + newFun(p1, p2) +} + +fun newFun(p1: String, p2: IntArray){} + +fun foo(array: IntArray) { + oldFun("a", *array) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt.after new file mode 100644 index 00000000000..9713bacb8ae --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, p2)")) +fun oldFun(p1: String, vararg p2: Int) { + newFun(p1, p2) +} + +fun newFun(p1: String, p2: IntArray){} + +fun foo(array: IntArray) { + newFun("a", array) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt new file mode 100644 index 00000000000..a5f5d621ea9 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, p2)")) +fun oldFun(p1: String, vararg p2: Int) { + newFun(p1, p2) +} + +fun newFun(p1: String, p2: IntArray){} + +fun foo() { + oldFun("a", 1, 2, 3) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt.after new file mode 100644 index 00000000000..212481dd7f2 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, p2)")) +fun oldFun(p1: String, vararg p2: Int) { + newFun(p1, p2) +} + +fun newFun(p1: String, p2: IntArray){} + +fun foo() { + newFun("a", intArrayOf(1, 2, 3)) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt new file mode 100644 index 00000000000..1373374f708 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, p2: IntArray) { + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo(array: IntArray) { + oldFun("a", array) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt.after new file mode 100644 index 00000000000..f7116c6aac9 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, p2: IntArray) { + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo(array: IntArray) { + newFun("a", *array) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt new file mode 100644 index 00000000000..5b2b85fc18a --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, p2: IntArray) { + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo() { + oldFun("a", intArrayOf(1, 2, 3)) +} diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt.after new file mode 100644 index 00000000000..b72ff59e7bc --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt.after @@ -0,0 +1,12 @@ +// "Replace with 'newFun(p1, *p2)'" "true" + +@deprecated("", ReplaceWith("newFun(p1, *p2)")) +fun oldFun(p1: String, p2: IntArray) { + newFun(p1, *p2) +} + +fun newFun(p1: String, vararg p2: Int){} + +fun foo() { + newFun("a", 1, 2, 3) +} diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java index 62a7ec8fdb6..cf672be4447 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixMultiFileTestGenerated.java @@ -848,30 +848,6 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedSymbolUsage extends AbstractQuickFixMultiFileTest { - @TestMetadata("addImportFromSamePackage.before.Main.kt") - public void testAddImportFromSamePackage() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/addImportFromSamePackage.before.Main.kt"); - doTestWithExtraFile(fileName); - } - - @TestMetadata("addImportFromSamePackage2.before.Main.kt") - public void testAddImportFromSamePackage2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/addImportFromSamePackage2.before.Main.kt"); - doTestWithExtraFile(fileName); - } - - @TestMetadata("addImportFromSamePackage3.before.Main.kt") - public void testAddImportFromSamePackage3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/addImportFromSamePackage3.before.Main.kt"); - doTestWithExtraFile(fileName); - } - - @TestMetadata("addImports.before.Main.kt") - public void testAddImports() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/addImports.before.Main.kt"); - doTestWithExtraFile(fileName); - } - public void testAllFilesPresentInDeprecatedSymbolUsage() throws Exception { JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage"), Pattern.compile("^(\\w+)\\.before\\.Main\\.kt$"), true); } @@ -882,6 +858,39 @@ public class QuickFixMultiFileTestGenerated extends AbstractQuickFixMultiFileTes doTestWithExtraFile(fileName); } + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Imports extends AbstractQuickFixMultiFileTest { + @TestMetadata("addImportFromSamePackage.before.Main.kt") + public void testAddImportFromSamePackage() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage.before.Main.kt"); + doTestWithExtraFile(fileName); + } + + @TestMetadata("addImportFromSamePackage2.before.Main.kt") + public void testAddImportFromSamePackage2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage2.before.Main.kt"); + doTestWithExtraFile(fileName); + } + + @TestMetadata("addImportFromSamePackage3.before.Main.kt") + public void testAddImportFromSamePackage3() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportFromSamePackage3.before.Main.kt"); + doTestWithExtraFile(fileName); + } + + @TestMetadata("addImports.before.Main.kt") + public void testAddImports() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImports.before.Main.kt"); + doTestWithExtraFile(fileName); + } + + public void testAllFilesPresentInImports() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/imports"), Pattern.compile("^(\\w+)\\.before\\.Main\\.kt$"), true); + } + } + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/wholeProject") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java index 5fed7d65e5b..b8cf7709040 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java @@ -2862,12 +2862,6 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class DeprecatedSymbolUsage extends AbstractQuickFixTest { - @TestMetadata("addImportRuntime.kt") - public void testAddImportRuntime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/addImportRuntime.kt"); - doTest(fileName); - } - public void testAllFilesPresentInDeprecatedSymbolUsage() throws Exception { JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage"), Pattern.compile("^(\\w+)\\.kt$"), true); } @@ -2890,126 +2884,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } - @TestMetadata("changeThisSafeCall.kt") - public void testChangeThisSafeCall() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThisSafeCall.kt"); - doTest(fileName); - } - - @TestMetadata("changeThisSafeCallWithValue1Runtime.kt") - public void testChangeThisSafeCallWithValue1Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThisSafeCallWithValue1Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("changeThisSafeCallWithValue2Runtime.kt") - public void testChangeThisSafeCallWithValue2Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThisSafeCallWithValue2Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("changeThisSafeCallWithValue3Runtime.kt") - public void testChangeThisSafeCallWithValue3Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThisSafeCallWithValue3Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("changeThisSafeCallWithValue4Runtime.kt") - public void testChangeThisSafeCallWithValue4Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThisSafeCallWithValue4Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("changeThisSafeCallWithValueRuntime.kt") - public void testChangeThisSafeCallWithValueRuntime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThisSafeCallWithValueRuntime.kt"); - doTest(fileName); - } - @TestMetadata("changeThisToOuterThis.kt") public void testChangeThisToOuterThis() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/changeThisToOuterThis.kt"); doTest(fileName); } - @TestMetadata("complexExpressionNotUsed1.kt") - public void testComplexExpressionNotUsed1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionNotUsed1.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionNotUsed2.kt") - public void testComplexExpressionNotUsed2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionNotUsed2.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionNotUsed3Runtime.kt") - public void testComplexExpressionNotUsed3Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionNotUsed3Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionNotUsed4Runtime.kt") - public void testComplexExpressionNotUsed4Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionNotUsed4Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionNotUsed5Runtime.kt") - public void testComplexExpressionNotUsed5Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionNotUsed5Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionNotUsedSafeCall.kt") - public void testComplexExpressionNotUsedSafeCall() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionNotUsedSafeCall.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionNotUsedSafeCall2Runtime.kt") - public void testComplexExpressionNotUsedSafeCall2Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionNotUsedSafeCall2Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionUsedTwice.kt") - public void testComplexExpressionUsedTwice() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionUsedTwice.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionUsedTwice2.kt") - public void testComplexExpressionUsedTwice2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionUsedTwice2.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionUsedTwice3Runtime.kt") - public void testComplexExpressionUsedTwice3Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionUsedTwice3Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionUsedTwice4.kt") - public void testComplexExpressionUsedTwice4() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionUsedTwice4.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionUsedTwice5Runtime.kt") - public void testComplexExpressionUsedTwice5Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionUsedTwice5Runtime.kt"); - doTest(fileName); - } - - @TestMetadata("complexExpressionUsedTwice6Runtime.kt") - public void testComplexExpressionUsedTwice6Runtime() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/complexExpressionUsedTwice6Runtime.kt"); - doTest(fileName); - } - @TestMetadata("doNotShortenUserReferences.kt") public void testDoNotShortenUserReferences() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/doNotShortenUserReferences.kt"); @@ -3028,12 +2908,6 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } - @TestMetadata("dropReceiverSafeCall.kt") - public void testDropReceiverSafeCall() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/dropReceiverSafeCall.kt"); - doTest(fileName); - } - @TestMetadata("extensionForGenericClass.kt") public void testExtensionForGenericClass() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/extensionForGenericClass.kt"); @@ -3124,48 +2998,6 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } - @TestMetadata("optionalParameters1.kt") - public void testOptionalParameters1() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters1.kt"); - doTest(fileName); - } - - @TestMetadata("optionalParameters2.kt") - public void testOptionalParameters2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters2.kt"); - doTest(fileName); - } - - @TestMetadata("optionalParameters3.kt") - public void testOptionalParameters3() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters3.kt"); - doTest(fileName); - } - - @TestMetadata("optionalParameters4.kt") - public void testOptionalParameters4() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters4.kt"); - doTest(fileName); - } - - @TestMetadata("optionalParameters5.kt") - public void testOptionalParameters5() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters5.kt"); - doTest(fileName); - } - - @TestMetadata("optionalParameters7.kt") - public void testOptionalParameters7() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters7.kt"); - doTest(fileName); - } - - @TestMetadata("optionalParameters9.kt") - public void testOptionalParameters9() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters9.kt"); - doTest(fileName); - } - @TestMetadata("parameters.kt") public void testParameters() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/parameters.kt"); @@ -3178,12 +3010,6 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } - @TestMetadata("safeCall.kt") - public void testSafeCall() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall.kt"); - doTest(fileName); - } - @TestMetadata("shortenReferences.kt") public void testShortenReferences() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/shortenReferences.kt"); @@ -3196,36 +3022,6 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } - @TestMetadata("simpleExpressionNotUsed.kt") - public void testSimpleExpressionNotUsed() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/simpleExpressionNotUsed.kt"); - doTest(fileName); - } - - @TestMetadata("simpleExpressionUsedTwice.kt") - public void testSimpleExpressionUsedTwice() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/simpleExpressionUsedTwice.kt"); - doTest(fileName); - } - - @TestMetadata("stringLiteralUsedTwice.kt") - public void testStringLiteralUsedTwice() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/stringLiteralUsedTwice.kt"); - doTest(fileName); - } - - @TestMetadata("stringTemplateUsedTwice.kt") - public void testStringTemplateUsedTwice() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/stringTemplateUsedTwice.kt"); - doTest(fileName); - } - - @TestMetadata("stringTemplateUsedTwice2.kt") - public void testStringTemplateUsedTwice2() throws Exception { - String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/stringTemplateUsedTwice2.kt"); - doTest(fileName); - } - @TestMetadata("toOuterClassMethod.kt") public void testToOuterClassMethod() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/toOuterClassMethod.kt"); @@ -3250,6 +3046,387 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest(fileName); } + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class ArgumentSideEffects extends AbstractQuickFixTest { + public void testAllFilesPresentInArgumentSideEffects() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("complexExpressionNotUsed1.kt") + public void testComplexExpressionNotUsed1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed1.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionNotUsed2.kt") + public void testComplexExpressionNotUsed2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed2.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionNotUsed3Runtime.kt") + public void testComplexExpressionNotUsed3Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed3Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionNotUsed4Runtime.kt") + public void testComplexExpressionNotUsed4Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed4Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionNotUsed5Runtime.kt") + public void testComplexExpressionNotUsed5Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsed5Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionNotUsedSafeCall.kt") + public void testComplexExpressionNotUsedSafeCall() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionNotUsedSafeCall2Runtime.kt") + public void testComplexExpressionNotUsedSafeCall2Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionNotUsedSafeCall2Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionUsedTwice.kt") + public void testComplexExpressionUsedTwice() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionUsedTwice2.kt") + public void testComplexExpressionUsedTwice2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice2.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionUsedTwice3Runtime.kt") + public void testComplexExpressionUsedTwice3Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice3Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionUsedTwice4.kt") + public void testComplexExpressionUsedTwice4() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice4.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionUsedTwice5Runtime.kt") + public void testComplexExpressionUsedTwice5Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice5Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("complexExpressionUsedTwice6Runtime.kt") + public void testComplexExpressionUsedTwice6Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/complexExpressionUsedTwice6Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("simpleExpressionNotUsed.kt") + public void testSimpleExpressionNotUsed() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/simpleExpressionNotUsed.kt"); + doTest(fileName); + } + + @TestMetadata("simpleExpressionUsedTwice.kt") + public void testSimpleExpressionUsedTwice() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/simpleExpressionUsedTwice.kt"); + doTest(fileName); + } + + @TestMetadata("stringLiteralUsedTwice.kt") + public void testStringLiteralUsedTwice() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringLiteralUsedTwice.kt"); + doTest(fileName); + } + + @TestMetadata("stringTemplateUsedTwice.kt") + public void testStringTemplateUsedTwice() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringTemplateUsedTwice.kt"); + doTest(fileName); + } + + @TestMetadata("stringTemplateUsedTwice2.kt") + public void testStringTemplateUsedTwice2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/argumentSideEffects/stringTemplateUsedTwice2.kt"); + doTest(fileName); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Imports extends AbstractQuickFixTest { + @TestMetadata("addImportRuntime.kt") + public void testAddImportRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/imports/addImportRuntime.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInImports() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/imports"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class OptionalParameters extends AbstractQuickFixTest { + public void testAllFilesPresentInOptionalParameters() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("optionalParameters1.kt") + public void testOptionalParameters1() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters1.kt"); + doTest(fileName); + } + + @TestMetadata("optionalParameters2.kt") + public void testOptionalParameters2() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters2.kt"); + doTest(fileName); + } + + @TestMetadata("optionalParameters3.kt") + public void testOptionalParameters3() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters3.kt"); + doTest(fileName); + } + + @TestMetadata("optionalParameters4.kt") + public void testOptionalParameters4() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters4.kt"); + doTest(fileName); + } + + @TestMetadata("optionalParameters5.kt") + public void testOptionalParameters5() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters5.kt"); + doTest(fileName); + } + + @TestMetadata("optionalParameters7.kt") + public void testOptionalParameters7() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters7.kt"); + doTest(fileName); + } + + @TestMetadata("optionalParameters9.kt") + public void testOptionalParameters9() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/optionalParameters/optionalParameters9.kt"); + doTest(fileName); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class SafeCall extends AbstractQuickFixTest { + public void testAllFilesPresentInSafeCall() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/safeCall"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("changeThisSafeCall.kt") + public void testChangeThisSafeCall() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCall.kt"); + doTest(fileName); + } + + @TestMetadata("changeThisSafeCallWithValue1Runtime.kt") + public void testChangeThisSafeCallWithValue1Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue1Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("changeThisSafeCallWithValue2Runtime.kt") + public void testChangeThisSafeCallWithValue2Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue2Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("changeThisSafeCallWithValue3Runtime.kt") + public void testChangeThisSafeCallWithValue3Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue3Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("changeThisSafeCallWithValue4Runtime.kt") + public void testChangeThisSafeCallWithValue4Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValue4Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("changeThisSafeCallWithValueRuntime.kt") + public void testChangeThisSafeCallWithValueRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/changeThisSafeCallWithValueRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("dropReceiverSafeCall.kt") + public void testDropReceiverSafeCall() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/dropReceiverSafeCall.kt"); + doTest(fileName); + } + + @TestMetadata("safeCall.kt") + public void testSafeCall() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/safeCall/safeCall.kt"); + doTest(fileName); + } + } + + @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Vararg extends AbstractQuickFixTest { + @TestMetadata("addedNamedArgumentAfterRuntime.kt") + public void testAddedNamedArgumentAfterRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedNamedArgumentAfterRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("addedPositionalArgumentAfterRuntime.kt") + public void testAddedPositionalArgumentAfterRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedPositionalArgumentAfterRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("addedSpreadArgumentAfterRuntime.kt") + public void testAddedSpreadArgumentAfterRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/addedSpreadArgumentAfterRuntime.kt"); + doTest(fileName); + } + + public void testAllFilesPresentInVararg() throws Exception { + JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/vararg"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), true); + } + + @TestMetadata("booleanArrayRuntime.kt") + public void testBooleanArrayRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/booleanArrayRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("byteArrayRuntime.kt") + public void testByteArrayRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/byteArrayRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("doNotShortenUserReferences2Runtime.kt") + public void testDoNotShortenUserReferences2Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferences2Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("doNotShortenUserReferencesRuntime.kt") + public void testDoNotShortenUserReferencesRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotShortenUserReferencesRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("doNotSimplifyOriginalCallRuntime.kt") + public void testDoNotSimplifyOriginalCallRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doNotSimplifyOriginalCallRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("doubleArrayRuntime.kt") + public void testDoubleArrayRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/doubleArrayRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("floatArrayRuntime.kt") + public void testFloatArrayRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/floatArrayRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("longArrayRuntime.kt") + public void testLongArrayRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/longArrayRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("multipleSpreadArguments2Runtime.kt") + public void testMultipleSpreadArguments2Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArguments2Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("multipleSpreadArgumentsRuntime.kt") + public void testMultipleSpreadArgumentsRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/multipleSpreadArgumentsRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("shortArrayRuntime.kt") + public void testShortArrayRuntime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/shortArrayRuntime.kt"); + doTest(fileName); + } + + @TestMetadata("vararg1Runtime.kt") + public void testVararg1Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg1Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("vararg2Runtime.kt") + public void testVararg2Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg2Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("vararg3Runtime.kt") + public void testVararg3Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg3Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("vararg4.kt") + public void testVararg4() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg4.kt"); + doTest(fileName); + } + + @TestMetadata("vararg5.kt") + public void testVararg5() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg5.kt"); + doTest(fileName); + } + + @TestMetadata("vararg6Runtime.kt") + public void testVararg6Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg6Runtime.kt"); + doTest(fileName); + } + + @TestMetadata("vararg7.kt") + public void testVararg7() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg7.kt"); + doTest(fileName); + } + + @TestMetadata("vararg8Runtime.kt") + public void testVararg8Runtime() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg/vararg8Runtime.kt"); + doTest(fileName); + } + } + } @TestMetadata("idea/testData/quickfix/expressions")