Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/kt2841_this.kt
T
2015-05-12 19:43:17 +02:00

18 lines
260 B
Kotlin
Vendored

package a
interface Closeable {
fun close() {}
}
class C : Closeable
public inline fun <T: Closeable, R> T.use(block: T.()-> R) : R {
return this.block()
}
fun test() {
C().use {
this.close()
<!UNRESOLVED_REFERENCE!>x<!>
}
}