Files
kotlin-fork/compiler/testData/ir/irText/expressions/kt23030.kt
T
2018-02-27 10:09:17 +03:00

20 lines
527 B
Kotlin
Vendored

operator fun Int.compareTo(c: Char) = 0
fun testOverloadedCompareToCall(x: Int, y: Char) =
x < y
fun testOverloadedCompareToCallWithSmartCast(x: Any, y: Any) =
x is Int && y is Char && x < y
fun testEqualsWithSmartCast(x: Any, y: Any) =
x is Int && y is Char && x == y
class C {
operator fun Int.compareTo(c: Char) = 0
fun testMemberExtensionCompareToCall(x: Int, y: Char) =
x < y
fun testMemberExtensionCompareToCallWithSmartCast(x: Any, y: Any) =
x is Int && y is Char && x < y
}