FIR: enable useCorrectedNullabilityForFlexibleTypeParameters
It's necessary for correct substitution of `T & Any` with `T = V..V?`.
This commit is contained in:
@@ -143,8 +143,7 @@ private fun ConeKotlinType.enhanceInflexibleType(
|
||||
val mergedAttributes = if (shouldAddAttribute) attributes + CompilerConeAttributes.EnhancedNullability else attributes
|
||||
val enhancedType = enhancedTag.constructType(mergedArguments, enhancedNullability, mergedAttributes)
|
||||
return if (effectiveQualifiers.isNotNullTypeParameter)
|
||||
ConeDefinitelyNotNullType.create(enhancedType, session.typeContext, useCorrectedNullabilityForFlexibleTypeParameters = true)
|
||||
?: enhancedType
|
||||
ConeDefinitelyNotNullType.create(enhancedType, session.typeContext) ?: enhancedType
|
||||
else
|
||||
enhancedType
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user