diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/UnusedUnaryOperatorInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/UnusedUnaryOperatorInspection.kt index 2b5dcedc8d0..22a6eddaf06 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/UnusedUnaryOperatorInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/UnusedUnaryOperatorInspection.kt @@ -7,14 +7,12 @@ package org.jetbrains.kotlin.idea.inspections import com.intellij.codeInspection.LocalQuickFix import com.intellij.codeInspection.ProblemDescriptor -import com.intellij.codeInspection.ProblemHighlightType import com.intellij.codeInspection.ProblemsHolder import com.intellij.openapi.project.Project import org.jetbrains.kotlin.builtins.KotlinBuiltIns import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.idea.KotlinBundle import org.jetbrains.kotlin.idea.caches.resolve.analyze -import org.jetbrains.kotlin.idea.util.textRangeIn import org.jetbrains.kotlin.lexer.KtTokens import org.jetbrains.kotlin.psi.KtPrefixExpression import org.jetbrains.kotlin.psi.prefixExpressionVisitor @@ -33,13 +31,7 @@ class UnusedUnaryOperatorInspection : AbstractKotlinInspection() { val operatorDescriptor = prefix.operationReference.getResolvedCall(context)?.resultingDescriptor as? DeclarationDescriptor ?: return if (!KotlinBuiltIns.isUnderKotlinPackage(operatorDescriptor)) return - holder.registerProblem( - prefix, - KotlinBundle.message("unused.unary.operator"), - ProblemHighlightType.LIKE_UNUSED_SYMBOL, - prefix.operationReference.textRangeIn(prefix), - RemoveUnaryOperatorFix() - ) + holder.registerProblem(prefix, KotlinBundle.message("unused.unary.operator"), RemoveUnaryOperatorFix()) }) private class RemoveUnaryOperatorFix : LocalQuickFix { diff --git a/idea/testData/inspectionsLocal/unusedUnaryOperator/basic2.kt b/idea/testData/inspectionsLocal/unusedUnaryOperator/basic2.kt index 7ee28701257..08f614bf2db 100644 --- a/idea/testData/inspectionsLocal/unusedUnaryOperator/basic2.kt +++ b/idea/testData/inspectionsLocal/unusedUnaryOperator/basic2.kt @@ -1,6 +1,6 @@ // "Remove unused unary operator" "true" fun test(foo: Int?): Int { val a = 1 + 2 - - 3 + - 3 return a } \ No newline at end of file