1b553ebfaf
Added tests from testData/codegen/box directory. There are blackbox tests in other directories and they are to be added.
16 lines
318 B
Kotlin
16 lines
318 B
Kotlin
class N() : ArrayList<Any>() {
|
|
override fun add(el: Any) : Boolean {
|
|
if (!super<ArrayList>.add(el)) {
|
|
throw Exception()
|
|
}
|
|
return false
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
val n = N()
|
|
if (n.add("239")) return "fail"
|
|
if (n.get(0) == "239") return "OK";
|
|
return "fail";
|
|
}
|