File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
idea/src/org/jetbrains/kotlin/idea/intentions/loopToCallChain Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ import org.jetbrains.kotlin.psi.psiUtil.forEachDescendantOfType
35
35
import org.jetbrains.kotlin.resolve.BindingContext
36
36
import org.jetbrains.kotlin.resolve.DescriptorUtils.isSubtypeOfClass
37
37
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
38
40
import org.jetbrains.kotlin.resolve.lazy.BodyResolveMode
39
41
import org.jetbrains.kotlin.types.KotlinType
40
42
import org.jetbrains.kotlin.utils.addToStdlib.check
@@ -244,8 +246,8 @@ private fun isExpressionTypeSupported(expression: KtExpression): Boolean {
244
246
private fun checkSmartCastsPreserved (loop : KtForExpression , matchResult : MatchResult ): Boolean {
245
247
val bindingContext = loop.analyze(BodyResolveMode .FULL )
246
248
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" )
249
251
250
252
var smartCastCount = 0
251
253
try {
You can’t perform that action at this time.
0 commit comments