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
@@ -0,0 +1,12 @@
// WITH_RUNTIME
import java.io.File
import java.io.BufferedReader
fun bar() {}
fun foo(reader: BufferedReader?) {
reader.use { reader ->
reader?.readLine()
bar()
}
}