[FIR] Add the Int? === null test example

^KT-62646
This commit is contained in:
Nikolay Lunyak
2024-02-26 17:47:49 +02:00
committed by Space Team
parent a19994b8b6
commit 4abfb2534a
2 changed files with 10 additions and 0 deletions
@@ -85,6 +85,11 @@ fun incompatibleIdentityRegardlessNullabilitySmartCast(a: Any?, b: Any?) {
}
}
fun incompatibleIdentityRegardlessNullabilityWithNull(a: Int?) {
a == null
a === null
}
fun incompatibleIdentityRegardlessNullabilityWithValueClasses(c: C?, d: D?) {
<!EQUALITY_NOT_APPLICABLE!>c == d<!>
<!EQUALITY_NOT_APPLICABLE, FORBIDDEN_IDENTITY_EQUALS!>c === d<!>