Remove empty try catch nodes from inlined code

This commit is contained in:
Michael Bogdanov
2014-10-22 15:03:23 +04:00
parent f50d8c0731
commit b212fbd0b5
5 changed files with 54 additions and 8 deletions
@@ -0,0 +1,18 @@
import test.*
fun call(): String {
return nonLocal()
}
inline fun nonLocal(): String {
mysynchronized(Object()) {
return "nonLocal"
}
return "local"
}
fun box(): String {
val call = call()
if (call != "nonLocal") return "fail $call"
return "OK"
}
@@ -0,0 +1,11 @@
package test
public inline fun <R> mysynchronized(lock: Any, block: () -> R): R {
try {
return block()
}
finally {
//do nothing
1
}
}