KT-12100 convert try / finally to use: 'this' receiver is now left as is
This commit is contained in:
@@ -3,5 +3,5 @@ import java.io.File
|
||||
import java.io.BufferedReader
|
||||
|
||||
fun BufferedReader.foo() {
|
||||
use { this.readLine() }
|
||||
this.use { this.readLine() }
|
||||
}
|
||||
@@ -8,6 +8,6 @@ class MyCloseable : Closeable {
|
||||
fun process(x: Int) = x
|
||||
|
||||
fun Int.foo() {
|
||||
use { this@MyCloseable.process(this) }
|
||||
this@MyCloseable.use { this@MyCloseable.process(this) }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user