[NI] Fix nullability for captured type in input types approximation
This commit is contained in:
committed by
Mikhail Zarechenskiy
parent
e5c87fdad7
commit
d4e8a30dcf
@@ -40,7 +40,9 @@ fun prepareArgumentTypeRegardingCaptureTypes(argumentType: UnwrappedType): Unwra
|
||||
}
|
||||
if (simpleType is NewCapturedType) {
|
||||
// todo may be we should respect flexible capture types also...
|
||||
return simpleType.constructor.supertypes.takeIf { it.isNotEmpty() }?.let{ intersectTypes(it) } ?: argumentType.builtIns.nullableAnyType
|
||||
return simpleType.constructor.supertypes.takeIf { it.isNotEmpty() }?.let {
|
||||
intersectTypes(it).makeNullableAsSpecified(simpleType.isMarkedNullable)
|
||||
} ?: argumentType.builtIns.nullableAnyType
|
||||
}
|
||||
return captureFromExpression(simpleType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user