KT-12100 convert try / finally to use: safe close() is allowed in finally + correct new lines
This commit is contained in:
@@ -3,5 +3,7 @@ import java.io.File
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
val reader = File("hello-world.txt").bufferedReader()
|
||||
reader.use { reader -> // do stuff with reader }
|
||||
reader.use { reader ->
|
||||
// do stuff with reader
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user