Add compatibility resolve when variable has "bad" intersection type
#KT-39468 Fixed
This commit is contained in:
+6
@@ -39,6 +39,8 @@ import org.jetbrains.kotlin.resolve.calls.model.KotlinCallArgument
|
||||
import org.jetbrains.kotlin.resolve.calls.model.SimpleKotlinCallArgument
|
||||
import org.jetbrains.kotlin.resolve.calls.results.SimpleConstraintSystem
|
||||
import org.jetbrains.kotlin.resolve.deprecation.DeprecationResolver
|
||||
import org.jetbrains.kotlin.types.KotlinType
|
||||
import org.jetbrains.kotlin.types.TypeIntersector
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||
|
||||
class KotlinResolutionStatelessCallbacksImpl(
|
||||
@@ -87,6 +89,10 @@ class KotlinResolutionStatelessCallbacksImpl(
|
||||
return org.jetbrains.kotlin.resolve.calls.inference.isApplicableCallForBuilderInference(descriptor, languageVersionSettings)
|
||||
}
|
||||
|
||||
override fun isOldIntersectionIsEmpty(types: Collection<KotlinType>): Boolean {
|
||||
return TypeIntersector.intersectTypes(types) == null
|
||||
}
|
||||
|
||||
override fun createConstraintSystemForOverloadResolution(
|
||||
constraintInjector: ConstraintInjector, builtIns: KotlinBuiltIns,
|
||||
): SimpleConstraintSystem {
|
||||
|
||||
Reference in New Issue
Block a user