Files
kotlin-fork/js/js.translator/testData/box/examples/basicmethod.kt
T
Ilya Gorbunov e4d7efcf06 Update expected reachable node count in JS tests
Caused by new coroutine API an its js support
2018-08-30 14:52:43 +03:00

22 lines
526 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1535
interface Tr {
fun extra(): String = "_"
}
class N() : ArrayList<Any>(), Tr {
override fun add(el: Any): Boolean {
super<ArrayList>.add(el)
return super<ArrayList>.add(el.toString() + super<Tr>.extra() + el + extra())
}
override fun extra(): String = super<Tr>.extra() + super<Tr>.extra()
}
fun box(): String {
val n = N()
n.add("239")
if (n.get(0) == "239" && n.get(1) == "239_239__") return "OK";
return "fail";
}