// TODO: muted automatically, investigate should it be ran for JS or not // IGNORE_BACKEND: JS class MyIterator(val v: T): Iterator { override fun next(): T = v override fun hasNext(): Boolean = true } fun box(): String { try { (MyIterator("") as java.util.Iterator).remove() throw AssertionError() } catch (e: UnsupportedOperationException) { return "OK" } }