JS: fixed tryCatchFinally test because of KT-7328 bug
This commit is contained in:
+3
-3
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user