4726dcce40
In order to make resolution still work for members not available from `Nothing`, we track the type without `Nothing?` and use that for resolution instead.
32 lines
582 B
Kotlin
Vendored
32 lines
582 B
Kotlin
Vendored
class A() {
|
|
override fun equals(other : Any?) : Boolean = false
|
|
}
|
|
|
|
fun f(): Unit {
|
|
var x: Int? = 1
|
|
x = null
|
|
x + 1
|
|
x <!UNSAFE_INFIX_CALL!>plus<!> 1
|
|
x <!UNSAFE_OPERATOR_CALL!><<!> 1
|
|
<!ASSIGNMENT_TYPE_MISMATCH!>x += 1<!>
|
|
|
|
x == 1
|
|
x != 1
|
|
|
|
<!EQUALITY_NOT_APPLICABLE!>A() == 1<!>
|
|
|
|
x === "1"
|
|
x !== "1"
|
|
|
|
x === 1
|
|
x !== 1
|
|
|
|
x..2
|
|
x in 1..2
|
|
|
|
val y : Boolean? = true
|
|
false || <!CONDITION_TYPE_MISMATCH!>y<!>
|
|
<!CONDITION_TYPE_MISMATCH!>y<!> && true
|
|
<!CONDITION_TYPE_MISMATCH!>y<!> && <!CONDITION_TYPE_MISMATCH!>1<!>
|
|
}
|