Files
kotlin-fork/compiler/testData/codegen/box/intrinsics/throwableParamOrder.kt
T
2019-11-19 11:00:09 +03:00

18 lines
345 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
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!!
}