diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeIntention.kt index 7f241c3cca0..bc2bd34d6a2 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeIntention.kt @@ -14,6 +14,7 @@ import org.jetbrains.kotlin.idea.refactoring.addTypeArgumentsIfNeeded import org.jetbrains.kotlin.idea.refactoring.getQualifiedTypeArgumentList import org.jetbrains.kotlin.idea.references.mainReference import org.jetbrains.kotlin.idea.search.usagesSearch.descriptor +import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.psi.* import org.jetbrains.kotlin.psi.psiUtil.endOffset import org.jetbrains.kotlin.psi.psiUtil.startOffset @@ -69,6 +70,7 @@ class RemoveExplicitTypeIntention : SelfTargetingRangeIntention { if (typeElement.receiver != null) return false diff --git a/idea/testData/intentions/removeExplicitType/suspendFunction.kt b/idea/testData/intentions/removeExplicitType/suspendFunction.kt new file mode 100644 index 00000000000..17689f06e83 --- /dev/null +++ b/idea/testData/intentions/removeExplicitType/suspendFunction.kt @@ -0,0 +1,5 @@ +// IS_APPLICABLE: false +fun test() { + val x: suspend (x: Int, y: Int) -> Unit = { x: Int, y: Int -> + } +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 3aa5c19f764..e0b505ba549 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -13928,6 +13928,11 @@ public class IntentionTestGenerated extends AbstractIntentionTest { public void testRemoveUnresolvedType() throws Exception { runTest("idea/testData/intentions/removeExplicitType/removeUnresolvedType.kt"); } + + @TestMetadata("suspendFunction.kt") + public void testSuspendFunction() throws Exception { + runTest("idea/testData/intentions/removeExplicitType/suspendFunction.kt"); + } } @TestMetadata("idea/testData/intentions/removeExplicitTypeArguments")