972b234db6
#KT-3150 fixed added check for PLACEHOLDER_FUNCTION_TYPE to constraint system
18 lines
255 B
Kotlin
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<!>
|
|
}
|
|
} |