[FIR] Add the Int? === null test example
^KT-62646
This commit is contained in:
committed by
Space Team
parent
a19994b8b6
commit
4abfb2534a
+5
@@ -85,6 +85,11 @@ fun incompatibleIdentityRegardlessNullabilitySmartCast(a: Any?, b: Any?) {
|
||||
}
|
||||
}
|
||||
|
||||
fun incompatibleIdentityRegardlessNullabilityWithNull(a: Int?) {
|
||||
a == null
|
||||
<!FORBIDDEN_IDENTITY_EQUALS_WARNING!>a === null<!>
|
||||
}
|
||||
|
||||
fun incompatibleIdentityRegardlessNullabilityWithValueClasses(c: C?, d: D?) {
|
||||
<!EQUALITY_NOT_APPLICABLE!>c == d<!>
|
||||
<!FORBIDDEN_IDENTITY_EQUALS!>c === d<!>
|
||||
|
||||
Reference in New Issue
Block a user