Files
kotlin-fork/compiler/testData/codegen/box/classes/kt2711.kt
T
2019-02-12 18:45:35 +03:00

16 lines
219 B
Kotlin
Vendored

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"
}