Fix 'in' operator intention for Strings (KT-13974)

This commit is contained in:
takahirom
2016-09-27 01:56:05 +09:00
committed by Dmitry Jemerov
parent 93c2e7dfc0
commit 925c48c2f0
8 changed files with 42 additions and 10 deletions
@@ -48,7 +48,8 @@ class ReplaceContainsIntention : SelfTargetingRangeIntention<KtDotQualifiedExpre
if (!element.isReceiverExpressionWithValue()) return null
val functionDescriptor = getFunctionDescriptor(element) ?: return null
if (!functionDescriptor.isOperator || !OperatorChecks.check(functionDescriptor).isSuccess) return null
if (!functionDescriptor.isOperator && !OperatorChecks.check(functionDescriptor).isSuccess) return null
return element.callExpression!!.calleeExpression!!.textRange
}