[FIR] Ignore nullability in the definition of "identity-less"
The definition of a "builtin" already ignores nullability. `Int? === String?` must trigger a diagnostic by design.
This commit is contained in:
committed by
Space Team
parent
5ecedcbb16
commit
8d04ab3142
@@ -19,7 +19,7 @@ fun case_1(x: Number?) {
|
||||
fun case_2(x: Number) {
|
||||
val y: Int? = null
|
||||
|
||||
if (x === y) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING!>x === y<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Int")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Int")!>x<!>.inv()
|
||||
}
|
||||
@@ -29,7 +29,7 @@ fun case_2(x: Number) {
|
||||
fun case_3(x: Number) {
|
||||
var y: Int? = null
|
||||
|
||||
if (x === y) {
|
||||
if (<!FORBIDDEN_IDENTITY_EQUALS_WARNING!>x === y<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Int")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Number & kotlin.Int")!>x<!>.inv()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user