[FIR] Allow Int? === null
It was decided to allow this comparison duting the last DM. ^KT-62646
This commit is contained in:
committed by
Space Team
parent
4abfb2534a
commit
6607c8a056
+1
@@ -103,6 +103,7 @@ object FirEqualityCompatibilityChecker : FirEqualityOperatorCallChecker(MppCheck
|
||||
val oneIsNotNull = !l.type.isNullable || !r.type.isNullable
|
||||
|
||||
return when {
|
||||
l.type.isNullableNothing || r.type.isNullableNothing -> Applicability.APPLICABLE
|
||||
l.isIdentityLess || r.isIdentityLess -> Applicability.INAPPLICABLE_AS_IDENTITY_LESS
|
||||
oneIsNotNull && shouldReportAsPerRules1(l, r, context) -> getInapplicabilityFor(l, r)
|
||||
else -> Applicability.APPLICABLE
|
||||
|
||||
Reference in New Issue
Block a user