From 5f4233e4bfc6bd7b78004cfa0380615458914241 Mon Sep 17 00:00:00 2001 From: Toshiaki Kameyama Date: Fri, 20 Oct 2017 09:07:52 +0300 Subject: [PATCH] Don't suggest "Remove explicit type specification" for an annotated type So #KT-20622 Fixed --- .../kotlin/idea/intentions/RemoveExplicitTypeIntention.kt | 1 + .../testData/intentions/removeExplicitType/hasAnnotation.kt | 5 +++++ .../kotlin/idea/intentions/IntentionTestGenerated.java | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 idea/testData/intentions/removeExplicitType/hasAnnotation.kt diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeIntention.kt index b335106f371..2ee47848540 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeIntention.kt @@ -42,6 +42,7 @@ class RemoveExplicitTypeIntention : SelfTargetingRangeIntention = 1 diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 220d906d583..163700df7b0 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -13184,6 +13184,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest { doTest(fileName); } + @TestMetadata("hasAnnotation.kt") + public void testHasAnnotation() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/hasAnnotation.kt"); + doTest(fileName); + } + @TestMetadata("notOnParameterOfFunctionType.kt") public void testNotOnParameterOfFunctionType() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/removeExplicitType/notOnParameterOfFunctionType.kt");