Fix for KT-5910: Can't call Throwable() in Kotlin

#KT-5910 Fixed
This commit is contained in:
Michael Bogdanov
2015-12-14 15:38:07 +03:00
parent d40e9ffc13
commit ca9e8fc5a7
6 changed files with 98 additions and 2 deletions
@@ -0,0 +1,17 @@
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!!
}