Files
kotlin-fork/idea/testData/checker/BinaryCallsOnNullableValues.kt
T
Alexander Udalov ec30d52978 Delete Hashable, pull up its members to Any
Extensions on nullable types remain in Library.kt

 #KT-1741 Obsolete
 #KT-2805 Obsolete
 #KT-1365 Fixed
 #KT-4517 In Progress
2014-03-02 19:54:08 +04:00

31 lines
535 B
Kotlin

class A() {
override fun equals(<warning>a</warning> : Any?) : Boolean = false
}
fun f(): Unit {
var x: Int? = <warning>1</warning>
x = 1
x <error>+</error> 1
x <error>plus</error> 1
x <error><</error> 1
x <error>+=</error> 1
x == 1
x != 1
<error>A() == 1</error>
<error>x === "1"</error>
<error>x !== "1"</error>
x === 1
x !== 1
x<error>..</error>2
<error>x</error> in 1..2
val y : Boolean? = true
false || <error>y</error>
<error>y</error> && true
<error>y</error> && <error>1</error>
}