[JS_IR] Enable RangeContainsLowering optimizations.
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
// IGNORE_BACKEND: JS_IR
|
||||
// IGNORE_BACKEND: JS_IR_ES6
|
||||
// TODO: muted automatically, investigate should it be ran for JS or not
|
||||
// IGNORE_BACKEND: JS
|
||||
|
||||
// WITH_RUNTIME
|
||||
import kotlin.test.*
|
||||
|
||||
class Value(val x: Int) : Comparable<Value> {
|
||||
override fun compareTo(other: Value): Int {
|
||||
@@ -22,8 +18,8 @@ class ValueRange(override val start: Value,
|
||||
operator fun Value.rangeTo(other: Value): ClosedRange<Value> = ValueRange(this, other)
|
||||
|
||||
fun box(): String {
|
||||
assert(Value(42) in Value(1)..Value(2))
|
||||
assert(Value(41) !in Value(40)..Value(42))
|
||||
assertTrue(Value(42) in Value(1)..Value(2))
|
||||
assertTrue(Value(41) !in Value(40)..Value(42))
|
||||
|
||||
return "OK"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user