Files
kotlin-fork/compiler/testData/codegen/box/classes/kt2711.kt
T
Roman Artemev 8a871b3f0c Update tests
2018-08-31 15:34:18 +03:00

17 lines
244 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
class IntRange {
operator fun contains(a: Int) = (1..2).contains(a)
}
class C() {
operator fun rangeTo(i: Int) = IntRange()
}
fun box(): String {
if (2 in C()..2) {
2 == 2
}
return "OK"
}