[FE] Make dynamic a suitable resulted type
This fixes a FIR-specific issue where a type variable is inferred to Any instead of dynamic. K1 wasn't affected because of a FIR-specific condition in ResultTypeResolver. #KT-57962 Fixed
This commit is contained in:
committed by
Space Team
parent
50841e7cb0
commit
6972391185
+1
-1
@@ -30,7 +30,7 @@ class TrivialConstraintTypeInferenceOracle private constructor(context: TypeSyst
|
||||
fun isSuitableResultedType(
|
||||
resultType: KotlinTypeMarker
|
||||
): Boolean {
|
||||
return !resultType.typeConstructor().isNothingConstructor()
|
||||
return !resultType.typeConstructor().isNothingConstructor() || (isK2 && resultType.isDynamic())
|
||||
}
|
||||
|
||||
// It's possible to generate Nothing-like constraints inside incorporation mechanism:
|
||||
|
||||
Reference in New Issue
Block a user