[FIR] Report ASSIGNMENT_TYPE_MISMATCH on properties with numeric types

^KT-46047
^KT-56951 Fixed
This commit is contained in:
Dmitriy Novozhilov
2023-04-28 14:47:25 +03:00
committed by Space Team
parent f7733e819d
commit 71d6103122
16 changed files with 111 additions and 76 deletions
@@ -449,15 +449,6 @@ fun checkTypeMismatch(
val typeContext = context.session.typeContext
if (!isSubtypeForTypeMismatch(typeContext, subtype = rValueType, supertype = lValueType)) {
if (rValueType is ConeClassLikeType &&
rValueType.lookupTag.classId == StandardClassIds.Int &&
lValueType.fullyExpandedType(context.session).isIntegerTypeOrNullableIntegerTypeOfAnySize &&
rValueType.nullability == ConeNullability.NOT_NULL
) {
// val p: Byte = 42 or similar situation
// TODO: remove after fix of KT-46047
return
}
if (lValueType.isExtensionFunctionType || rValueType.isExtensionFunctionType) {
// TODO: remove after fix of KT-45989
return