Files
kotlin-fork/compiler/testData/diagnostics/tests/inference/regressions/kt2841_it.kt
T
Svetlana Isakova 972b234db6 KT-3150 Kotlin m4 don't recognize function literals
#KT-3150 fixed

 added check for PLACEHOLDER_FUNCTION_TYPE to constraint system
2012-12-25 19:12:00 +04:00

18 lines
255 B
Kotlin

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