From 0fad3fafa86cbc9103a3e56a8faebe08c66e9067 Mon Sep 17 00:00:00 2001 From: Toshiaki Kameyama Date: Mon, 15 Apr 2019 17:03:12 +0900 Subject: [PATCH] Replace deprecated symbol usage: fix message in case of generic parameter #KT-8958 Fixed --- .../replaceWith/DeprecatedSymbolUsageFix.kt | 4 +- .../DeprecatedSymbolUsageFixBase.kt | 62 ++++++++++++++----- .../DeprecatedSymbolUsageInWholeProjectFix.kt | 2 +- .../ReplaceWithAnnotationAnalyzer.kt | 2 +- .../classUsages/innerType.kt | 2 +- .../classUsages/innerType.kt.after | 2 +- .../typeAliases/withTypeArgument.kt | 2 +- .../typeAliases/withTypeArgument.kt.after | 2 +- .../typeArguments/classLiteral.kt | 7 +++ .../typeArguments/classLiteral.kt.after | 7 +++ .../typeArguments/classLiteral2.kt | 8 +++ .../typeArguments/classLiteral2.kt.after | 8 +++ .../typeArguments/explicitTypeArg2.kt | 13 ++++ .../typeArguments/explicitTypeArg2.kt.after | 13 ++++ .../typeArguments/typeReference.kt | 8 +++ .../typeArguments/typeReference.kt.after | 8 +++ .../DeprecatedSymbolUsageFixSpecialTest.kt | 2 +- .../idea/quickfix/QuickFixTestGenerated.java | 20 ++++++ 18 files changed, 149 insertions(+), 23 deletions(-) create mode 100644 idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt create mode 100644 idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt.after create mode 100644 idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt create mode 100644 idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt.after create mode 100644 idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt create mode 100644 idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt.after create mode 100644 idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt create mode 100644 idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt.after diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageFix.kt index 2a0283e39fa..3a715bc5f90 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageFix.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageFix.kt @@ -50,7 +50,7 @@ class DeprecatedSymbolUsageFix( companion object : KotlinSingleIntentionActionFactory() { override fun createAction(diagnostic: Diagnostic): IntentionAction? { - val (nameExpression, replacement) = extractDataFromDiagnostic(diagnostic) ?: return null + val (nameExpression, replacement) = extractDataFromDiagnostic(diagnostic, false) ?: return null return DeprecatedSymbolUsageFix(nameExpression, replacement) } @@ -61,7 +61,7 @@ class DeprecatedSymbolUsageFix( if (targetDescriptors.isEmpty()) return false return targetDescriptors.all { - fetchReplaceWithPattern(it, import.project, null) != null + fetchReplaceWithPattern(it, import.project, null, false) != null } } } diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageFixBase.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageFixBase.kt index e75107d8056..8e7086ffdf8 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageFixBase.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageFixBase.kt @@ -29,6 +29,7 @@ import org.jetbrains.kotlin.diagnostics.Diagnostic import org.jetbrains.kotlin.diagnostics.DiagnosticFactory import org.jetbrains.kotlin.diagnostics.Errors import org.jetbrains.kotlin.idea.caches.KotlinShortNamesCache +import org.jetbrains.kotlin.idea.caches.resolve.analyze import org.jetbrains.kotlin.idea.caches.resolve.getResolutionFacade import org.jetbrains.kotlin.idea.codeInliner.CallableUsageReplacementStrategy import org.jetbrains.kotlin.idea.codeInliner.ClassUsageReplacementStrategy @@ -45,6 +46,7 @@ import org.jetbrains.kotlin.psi.psiUtil.getStrictParentOfType import org.jetbrains.kotlin.psi.psiUtil.isCallee import org.jetbrains.kotlin.psi.psiUtil.referenceExpression import org.jetbrains.kotlin.renderer.DescriptorRenderer +import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.annotations.argumentValue import org.jetbrains.kotlin.resolve.calls.callUtil.getResolvedCall import org.jetbrains.kotlin.resolve.calls.components.hasDefaultValue @@ -83,7 +85,8 @@ abstract class DeprecatedSymbolUsageFixBase( fun fetchReplaceWithPattern( descriptor: DeclarationDescriptor, project: Project, - contextElement: KtSimpleNameExpression? + contextElement: KtSimpleNameExpression?, + replaceInWholeProject: Boolean ): ReplaceWith? { val annotation = descriptor.annotations.findAnnotation(KotlinBuiltIns.FQ_NAMES.deprecated) ?: return null val replaceWithValue = @@ -100,7 +103,11 @@ abstract class DeprecatedSymbolUsageFixBase( } ) return null - return ReplaceWith(pattern.applyContextElement(contextElement, descriptor), imports) + return if (replaceInWholeProject) { + ReplaceWith(pattern, imports, true) + } else { + ReplaceWith(pattern.applyContextElement(contextElement, descriptor), imports, false) + } } private fun String.applyContextElement( @@ -108,7 +115,29 @@ abstract class DeprecatedSymbolUsageFixBase( descriptor: DeclarationDescriptor ): String { if (element == null) return this - val expressionFromPattern = KtPsiFactory(element).createExpressionIfPossible(this) as? KtCallExpression ?: return this + val psiFactory = KtPsiFactory(element) + val expressionFromPattern = psiFactory.createExpressionIfPossible(this) ?: return this + + val classLiteral = when (expressionFromPattern) { + is KtClassLiteralExpression -> expressionFromPattern + is KtDotQualifiedExpression -> expressionFromPattern.receiverExpression as? KtClassLiteralExpression + else -> null + } + if (classLiteral != null) { + val receiver = classLiteral.receiverExpression ?: return this + val typeParameterText = (descriptor as? CallableDescriptor)?.typeParameters?.firstOrNull()?.name?.asString() ?: return this + if (receiver.text != typeParameterText) return this + val typeReference = (element.parent as KtCallExpression).typeArguments.firstOrNull()?.typeReference ?: return this + val type = element.analyze(BodyResolveMode.PARTIAL)[BindingContext.TYPE, typeReference] + if (type != null && KotlinBuiltIns.isArray(type)) { + receiver.replace(typeReference) + } else { + receiver.replace(psiFactory.createExpression(typeReference.text.takeWhile { it != '<' })) + } + return expressionFromPattern.text + } + + if (expressionFromPattern !is KtCallExpression) return this val methodFromPattern = expressionFromPattern.referenceExpression()?.let { name -> KotlinShortNamesCache(element.project).getMethodsByName( name.text, @@ -122,7 +151,10 @@ abstract class DeprecatedSymbolUsageFixBase( ?: return this val typeArgumentList = (element.parent as? KtCallExpression)?.typeArgumentList - return if (descriptor is CallableDescriptor && descriptor.typeParametersCount == patternTypeArgumentCount || + ?: (element.parent as? KtUserType)?.typeArgumentList + val descriptorTypeParameterCount = (descriptor as? CallableDescriptor)?.typeParametersCount + ?: (descriptor as? ClassDescriptor)?.declaredTypeParameters?.size + return if (patternTypeArgumentCount == descriptorTypeParameterCount || patternTypeArgumentCount == typeArgumentList?.arguments?.size ) { if (typeArgumentList != null) expressionFromPattern.replaceOrCreateTypeArgumentList(typeArgumentList.copy() as KtTypeArgumentList) @@ -137,10 +169,8 @@ abstract class DeprecatedSymbolUsageFixBase( val descriptor: DeclarationDescriptor ) - fun extractDataFromDiagnostic(deprecatedDiagnostic: Diagnostic): Data? { - val psiElement = deprecatedDiagnostic.psiElement - - val nameExpression: KtSimpleNameExpression = when (psiElement) { + fun extractDataFromDiagnostic(deprecatedDiagnostic: Diagnostic, replaceInWholeProject: Boolean): Data? { + val nameExpression: KtSimpleNameExpression = when (val psiElement = deprecatedDiagnostic.psiElement) { is KtSimpleNameExpression -> psiElement is KtConstructorCalleeExpression -> psiElement.constructorReferenceExpression else -> null @@ -156,7 +186,8 @@ abstract class DeprecatedSymbolUsageFixBase( else -> throw IllegalStateException("Bad QuickFixRegistrar configuration") } - val replacement = fetchReplaceWithPattern(descriptor, nameExpression.project, nameExpression) ?: return null + val replacement = + fetchReplaceWithPattern(descriptor, nameExpression.project, nameExpression, replaceInWholeProject) ?: return null return Data(nameExpression, replacement, descriptor) } @@ -171,10 +202,12 @@ abstract class DeprecatedSymbolUsageFixBase( val bindingContext = resolutionFacade.analyze(element, BodyResolveMode.PARTIAL) var target = element.mainReference.resolveToDescriptors(bindingContext).singleOrNull() ?: return null - var replacePatternFromSymbol = fetchReplaceWithPattern(target, resolutionFacade.project, element) + var replacePatternFromSymbol = + fetchReplaceWithPattern(target, resolutionFacade.project, element, replaceWith.replaceInWholeProject) if (replacePatternFromSymbol == null && target is ConstructorDescriptor) { target = target.containingDeclaration - replacePatternFromSymbol = fetchReplaceWithPattern(target, resolutionFacade.project, element) + replacePatternFromSymbol = + fetchReplaceWithPattern(target, resolutionFacade.project, element, replaceWith.replaceInWholeProject) } // check that ReplaceWith hasn't changed @@ -201,7 +234,7 @@ abstract class DeprecatedSymbolUsageFixBase( ?.getStrictParentOfType() if (typeAlias != null) { val usedConstructorWithOwnReplaceWith = usedConstructorsWithOwnReplaceWith( - element.project, target, typeAlias, element + element.project, target, typeAlias, element, replaceWith.replaceInWholeProject ) if (usedConstructorWithOwnReplaceWith != null) { @@ -243,10 +276,11 @@ abstract class DeprecatedSymbolUsageFixBase( project: Project, classifier: ClassifierDescriptorWithTypeParameters, typeAlias: PsiElement, - contextElement: KtSimpleNameExpression + contextElement: KtSimpleNameExpression, + replaceInWholeProject: Boolean ): ConstructorDescriptor? { val specialReplaceWithForConstructor = classifier.constructors.filter { - fetchReplaceWithPattern(it, project, contextElement) != null + fetchReplaceWithPattern(it, project, contextElement, replaceInWholeProject) != null }.toSet() if (specialReplaceWithForConstructor.isEmpty()) { diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageInWholeProjectFix.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageInWholeProjectFix.kt index 3ecce7f3769..9b72f8117f9 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageInWholeProjectFix.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/DeprecatedSymbolUsageInWholeProjectFix.kt @@ -77,7 +77,7 @@ class DeprecatedSymbolUsageInWholeProjectFix( } override fun createAction(diagnostic: Diagnostic): IntentionAction? { - val (nameExpression, replacement, descriptor) = extractDataFromDiagnostic(diagnostic) ?: return null + val (nameExpression, replacement, descriptor) = extractDataFromDiagnostic(diagnostic, true) ?: return null val descriptorName = RENDERER.render(descriptor) return DeprecatedSymbolUsageInWholeProjectFix( nameExpression, diff --git a/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/ReplaceWithAnnotationAnalyzer.kt b/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/ReplaceWithAnnotationAnalyzer.kt index a7f37d8e70c..182bcb593fa 100644 --- a/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/ReplaceWithAnnotationAnalyzer.kt +++ b/idea/src/org/jetbrains/kotlin/idea/quickfix/replaceWith/ReplaceWithAnnotationAnalyzer.kt @@ -44,7 +44,7 @@ import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.jetbrains.kotlin.types.expressions.ExpressionTypingServices import java.util.* -data class ReplaceWith(val pattern: String, val imports: List) +data class ReplaceWith(val pattern: String, val imports: List, val replaceInWholeProject: Boolean) object ReplaceWithAnnotationAnalyzer { fun analyzeCallableReplacement( diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt index c7cf0009464..c7bcb4007f7 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt @@ -1,4 +1,4 @@ -// "Replace with 'B'" "true" +// "Replace with 'B>'" "true" // WITH_RUNTIME @Deprecated(message = "renamed", replaceWith = ReplaceWith("B")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt.after index 0d4e77f7126..fd5c1c404af 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/classUsages/innerType.kt.after @@ -1,4 +1,4 @@ -// "Replace with 'B'" "true" +// "Replace with 'B>'" "true" // WITH_RUNTIME @Deprecated(message = "renamed", replaceWith = ReplaceWith("B")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt index 96f58a627c0..810227b03da 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt @@ -1,4 +1,4 @@ -// "Replace with 'B'" "true" +// "Replace with 'B'" "true" // WITH_RUNTIME @Deprecated(message = "renamed", replaceWith = ReplaceWith("B")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt.after index 776b35e41b0..f9a0a165df8 100644 --- a/idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt.after +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeAliases/withTypeArgument.kt.after @@ -1,4 +1,4 @@ -// "Replace with 'B'" "true" +// "Replace with 'B'" "true" // WITH_RUNTIME @Deprecated(message = "renamed", replaceWith = ReplaceWith("B")) diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt new file mode 100644 index 00000000000..1a97347f58e --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt @@ -0,0 +1,7 @@ +// "Replace with 'String::class'" "true" + +@Deprecated("Use class literal", ReplaceWith("T::class")) +fun foo() { +} + +val x = foo() \ No newline at end of file diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt.after new file mode 100644 index 00000000000..7f2288632ff --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt.after @@ -0,0 +1,7 @@ +// "Replace with 'String::class'" "true" + +@Deprecated("Use class literal", ReplaceWith("T::class")) +fun foo() { +} + +val x = String::class \ No newline at end of file diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt new file mode 100644 index 00000000000..02bbecf0d01 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt @@ -0,0 +1,8 @@ +// "Replace with 'Int::class.java'" "true" +// WITH_RUNTIME + +@Deprecated("Use class literal", ReplaceWith("T::class.java")) +fun foo() { +} + +val x = foo() \ No newline at end of file diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt.after new file mode 100644 index 00000000000..3bee9c90a14 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt.after @@ -0,0 +1,8 @@ +// "Replace with 'Int::class.java'" "true" +// WITH_RUNTIME + +@Deprecated("Use class literal", ReplaceWith("T::class.java")) +fun foo() { +} + +val x = Int::class.java \ No newline at end of file diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt new file mode 100644 index 00000000000..292eaa11861 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt @@ -0,0 +1,13 @@ +// "Replace usages of 'old(): Unit' in whole project" "true" + +@Deprecated("Use new", ReplaceWith("new()")) +fun old() { +} + +fun new() { +} + +fun main() { + old() + old() +} \ No newline at end of file diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt.after new file mode 100644 index 00000000000..2b09063d592 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt.after @@ -0,0 +1,13 @@ +// "Replace usages of 'old(): Unit' in whole project" "true" + +@Deprecated("Use new", ReplaceWith("new()")) +fun old() { +} + +fun new() { +} + +fun main() { + new() + new() +} \ No newline at end of file diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt new file mode 100644 index 00000000000..8cbe6ad5fed --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt @@ -0,0 +1,8 @@ +// "Replace with 'New'" "true" + +@Deprecated("Use New", replaceWith = ReplaceWith("New")) +class Old + +class New + +fun foo(): Old? = null \ No newline at end of file diff --git a/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt.after b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt.after new file mode 100644 index 00000000000..b701ad62293 --- /dev/null +++ b/idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt.after @@ -0,0 +1,8 @@ +// "Replace with 'New'" "true" + +@Deprecated("Use New", replaceWith = ReplaceWith("New")) +class Old + +class New + +fun foo(): New? = null \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixSpecialTest.kt b/idea/tests/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixSpecialTest.kt index a89023079dd..5ca4de24145 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixSpecialTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/DeprecatedSymbolUsageFixSpecialTest.kt @@ -44,7 +44,7 @@ class DeprecatedSymbolUsageFixSpecialTest : KotlinLightCodeInsightFixtureTestCas val element = file.findElementAt(offset) val nameExpression = element!!.parents.firstIsInstance() project.executeWriteCommand("") { - DeprecatedSymbolUsageFix(nameExpression, ReplaceWith(pattern, emptyList())).invoke(project, editor, file) + DeprecatedSymbolUsageFix(nameExpression, ReplaceWith(pattern, emptyList(), false)).invoke(project, editor, file) } myFixture.checkResultByFile("$testPath.after") diff --git a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java index 2a720dfa58e..0c61fc58974 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/quickfix/QuickFixTestGenerated.java @@ -6617,6 +6617,16 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } + @TestMetadata("classLiteral.kt") + public void testClassLiteral() throws Exception { + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral.kt"); + } + + @TestMetadata("classLiteral2.kt") + public void testClassLiteral2() throws Exception { + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/classLiteral2.kt"); + } + @TestMetadata("emptyVarargRuntime.kt") public void testEmptyVarargRuntime() throws Exception { runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/emptyVarargRuntime.kt"); @@ -6632,6 +6642,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg.kt"); } + @TestMetadata("explicitTypeArg2.kt") + public void testExplicitTypeArg2() throws Exception { + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/explicitTypeArg2.kt"); + } + @TestMetadata("keepInUserCodeRuntime.kt") public void testKeepInUserCodeRuntime() throws Exception { runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/keepInUserCodeRuntime.kt"); @@ -6651,6 +6666,11 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { public void testNonEmptyVarargRuntime() throws Exception { runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/nonEmptyVarargRuntime.kt"); } + + @TestMetadata("typeReference.kt") + public void testTypeReference() throws Exception { + runTest("idea/testData/quickfix/deprecatedSymbolUsage/typeArguments/typeReference.kt"); + } } @TestMetadata("idea/testData/quickfix/deprecatedSymbolUsage/vararg")