From 1987187968317eafbace3b199897b619be9fd7a9 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Wed, 17 Aug 2016 17:20:45 +0300 Subject: [PATCH] Build fix: IMPLICIT_RECEIVER_SMARTCAST and SMARTCAST slices in matchAndConvert.kt --- .../idea/intentions/loopToCallChain/matchAndConvert.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/matchAndConvert.kt b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/matchAndConvert.kt index 9e953689ada..4fb3f1aa419 100644 --- a/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/matchAndConvert.kt +++ b/idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/matchAndConvert.kt @@ -35,6 +35,8 @@ import org.jetbrains.kotlin.psi.psiUtil.forEachDescendantOfType import org.jetbrains.kotlin.resolve.BindingContext import org.jetbrains.kotlin.resolve.DescriptorUtils.isSubtypeOfClass import org.jetbrains.kotlin.resolve.bindingContextUtil.getDataFlowInfo +import org.jetbrains.kotlin.resolve.calls.smartcasts.ExplicitSmartCasts +import org.jetbrains.kotlin.resolve.calls.smartcasts.ImplicitSmartCasts import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode import org.jetbrains.kotlin.types.KotlinType import org.jetbrains.kotlin.utils.addToStdlib.check @@ -244,8 +246,8 @@ private fun isExpressionTypeSupported(expression: KtExpression): Boolean { private fun checkSmartCastsPreserved(loop: KtForExpression, matchResult: MatchResult): Boolean { val bindingContext = loop.analyze(BodyResolveMode.FULL) - val SMARTCAST_KEY = Key("SMARTCAST_KEY") - val IMPLICIT_RECEIVER_SMARTCAST_KEY = Key("IMPLICIT_RECEIVER_SMARTCAST") + val SMARTCAST_KEY = Key("SMARTCAST_KEY") + val IMPLICIT_RECEIVER_SMARTCAST_KEY = Key("IMPLICIT_RECEIVER_SMARTCAST") var smartCastCount = 0 try {