Skip to content

Commit 1987187

Browse files
committed
Build fix: IMPLICIT_RECEIVER_SMARTCAST and SMARTCAST slices in matchAndConvert.kt
1 parent ae856e8 commit 1987187

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain/matchAndConvert.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ import org.jetbrains.kotlin.psi.psiUtil.forEachDescendantOfType
3535
import org.jetbrains.kotlin.resolve.BindingContext
3636
import org.jetbrains.kotlin.resolve.DescriptorUtils.isSubtypeOfClass
3737
import org.jetbrains.kotlin.resolve.bindingContextUtil.getDataFlowInfo
38+
import org.jetbrains.kotlin.resolve.calls.smartcasts.ExplicitSmartCasts
39+
import org.jetbrains.kotlin.resolve.calls.smartcasts.ImplicitSmartCasts
3840
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
3941
import org.jetbrains.kotlin.types.KotlinType
4042
import org.jetbrains.kotlin.utils.addToStdlib.check
@@ -244,8 +246,8 @@ private fun isExpressionTypeSupported(expression: KtExpression): Boolean {
244246
private fun checkSmartCastsPreserved(loop: KtForExpression, matchResult: MatchResult): Boolean {
245247
val bindingContext = loop.analyze(BodyResolveMode.FULL)
246248

247-
val SMARTCAST_KEY = Key<KotlinType>("SMARTCAST_KEY")
248-
val IMPLICIT_RECEIVER_SMARTCAST_KEY = Key<KotlinType>("IMPLICIT_RECEIVER_SMARTCAST")
249+
val SMARTCAST_KEY = Key<ExplicitSmartCasts>("SMARTCAST_KEY")
250+
val IMPLICIT_RECEIVER_SMARTCAST_KEY = Key<ImplicitSmartCasts>("IMPLICIT_RECEIVER_SMARTCAST")
249251

250252
var smartCastCount = 0
251253
try {

0 commit comments

Comments
 (0)