JS: fixed tryCatchFinally test because of KT-7328 bug

This commit is contained in:
Alexey Tsvetkov
2015-04-07 20:01:51 +03:00
parent 78a6b95f5a
commit bf5300a849
@@ -6,7 +6,7 @@ class My(val value: Int)
inline fun <T, R> T.performWithFinally(job: (T)-> R, finallyFun: (T) -> R) : R {
try {
return job(this)
job(this)
} finally {
return finallyFun(this)
}
@@ -14,9 +14,9 @@ inline fun <T, R> T.performWithFinally(job: (T)-> R, finallyFun: (T) -> R) : R {
inline fun <T, R> T.performWithFailFinally(job: (T)-> R, failJob : (e: RuntimeException, T) -> R, finallyFun: (T) -> R) : R {
try {
return job(this)
job(this)
} catch (e: RuntimeException) {
return failJob(e, this)
failJob(e, this)
} finally {
return finallyFun(this)
}