Files
kotlin-fork/compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt
T
2016-11-09 21:41:12 +03:00

20 lines
411 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
var res = ""
fun getM(): String {
res += "M"
return "OK"
}
fun getT(): Throwable {
res += "T"
return Throwable("test", null)
}
fun box(): String {
val z = Throwable(cause = getT(), message = getM())
if (res != "TM") return "Wrong argument calculation order: $res"
return z.message!!
}