Fix inline class type coercion in == with generic call
#KT-27393 Fixed
This commit is contained in:
@@ -3254,7 +3254,16 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
}
|
||||
|
||||
private StackValue genLazyUnlessProvided(@Nullable StackValue pregenerated, @NotNull KtExpression expr, @NotNull Type type) {
|
||||
return pregenerated != null ? StackValue.coercion(pregenerated, type, null) : genLazy(expr, type);
|
||||
return genLazyUnlessProvided(pregenerated, expr, type, null);
|
||||
}
|
||||
|
||||
private StackValue genLazyUnlessProvided(
|
||||
@Nullable StackValue pregenerated,
|
||||
@NotNull KtExpression expr,
|
||||
@NotNull Type type,
|
||||
@Nullable KotlinType kotlinType
|
||||
) {
|
||||
return pregenerated != null ? StackValue.coercion(pregenerated, type, kotlinType) : genLazy(expr, type, kotlinType);
|
||||
}
|
||||
|
||||
private StackValue genUnlessProvided(@Nullable StackValue pregenerated, @NotNull KtExpression expr, @NotNull Type type) {
|
||||
@@ -3399,8 +3408,8 @@ public class ExpressionCodegen extends KtVisitor<StackValue, StackValue> impleme
|
||||
KotlinType leftKotlinType = kotlinType(left);
|
||||
KotlinType rightKotlinType = kotlinType(right);
|
||||
|
||||
StackValue leftValue = genLazyUnlessProvided(pregeneratedSubject, left, leftType);
|
||||
StackValue rightValue = genLazy(right, rightType);
|
||||
StackValue leftValue = genLazyUnlessProvided(pregeneratedSubject, left, leftType, leftKotlinType);
|
||||
StackValue rightValue = genLazy(right, rightType, rightKotlinType);
|
||||
|
||||
return StackValue.operation(Type.BOOLEAN_TYPE, v -> {
|
||||
KotlinType nullableAnyType = state.getModule().getBuiltIns().getNullableAnyType();
|
||||
|
||||
Reference in New Issue
Block a user