From 4c0e7e32e7ba05260f70e45bc5032b2add21f8ea Mon Sep 17 00:00:00 2001 From: Sergey Mashkov Date: Mon, 15 Jun 2015 17:38:24 +0300 Subject: [PATCH] KT-8080 RemoveExplicitTypeArgumentsIntention crashes with AssertionError --- .../idea/intentions/RemoveExplicitTypeArgumentsIntention.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeArgumentsIntention.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeArgumentsIntention.kt index db0e7265607..e5bca162587 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeArgumentsIntention.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/RemoveExplicitTypeArgumentsIntention.kt @@ -73,8 +73,8 @@ public class RemoveExplicitTypeArgumentsIntention : JetSelfTargetingOffsetIndepe val injector = InjectorForMacros(callExpression.getProject(), callExpression.findModuleDescriptor()) val resolutionResults = injector.getCallResolver().resolveFunctionCall( BindingTraceContext(), scope, untypedCall, expectedType, dataFlow, false) - assert (resolutionResults.isSingleResult()) { - "Removing type arguments changed resolve for: ${callExpression.getTextWithLocation()} to ${resolutionResults.getResultCode()}" + if (!resolutionResults.isSingleResult()) { + return false } val args = originalCall.getTypeArguments()