Files
kotlin-fork/compiler/testData/codegen/super/basicmethodSuperClass.jet
T
Stepan Koltsov 95f9bcbacb enhance tests (mostly codegen)
* drop dependency on stdlib/alt-headers in the most tests
* assign to myEnvironment at most once in JetLiteFixture
* more tests do not compile runtime
2012-05-01 19:11:48 +04:00

18 lines
347 B
Plaintext

import java.util.ArrayList
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";
}