KT-12100 convert try / finally to use: safe close() is allowed in finally + correct new lines

This commit is contained in:
Mikhail Glukhikh
2016-12-01 19:23:18 +03:00
parent 0ac443066e
commit 0cc52e2ff8
9 changed files with 37 additions and 11 deletions
@@ -8,6 +8,8 @@ class MyCloseable : Closeable {
fun process(x: Int) = x
fun Int.foo() {
this@MyCloseable.use { this@MyCloseable.process(this) }
this@MyCloseable.use {
this@MyCloseable.process(this)
}
}
}