// IGNORE_BACKEND: JS_IR // TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS, NATIVE class MyIterator : Iterator { override fun next() = null!! override fun hasNext() = null!! } fun box(): String { try { (MyIterator() as java.util.Iterator).remove() return "Fail" } catch (e: UnsupportedOperationException) { return "OK" } }