[NI] Consider intersection type with number type as Nothing
Currently, only for "in": In<in Int & A> == In<in Nothing> == In<*> #KT-37302 Fixed
This commit is contained in:
@@ -2803,7 +2803,7 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
KotlinType approximatedType =
|
||||
CapturedTypeConstructorKt.isCaptured(type) ?
|
||||
(KotlinType) approximator.approximateToSuperType(
|
||||
type, TypeApproximatorConfiguration.CapturedAndIntegerLiteralsTypesApproximation.INSTANCE
|
||||
type, TypeApproximatorConfiguration.InternalTypesApproximation.INSTANCE
|
||||
) : null;
|
||||
return approximatedType != null ? approximatedType : type;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user