Files
kotlin-fork/compiler/testData/cfg/declarations/classesAndObjects/QualifierReceiverWithOthers.kt
T
Mikhail Glukhikh b7ed68db05 CFA: No more UNRESOLVED_CALL for object / enum entry qualifiers
(cherry picked from commit 4b09de8)
2016-08-08 17:47:40 +03:00

21 lines
293 B
Kotlin
Vendored

class A {
companion object
}
object B {
val A.Companion.foo: X get() = X
}
object X
object C {
operator fun X.invoke() = println("Hello!")
}
inline fun <T, R> with(receiver: T, block: T.() -> R): R = receiver.block()
fun use() = with(C) {
with(B) {
A.foo()
}
}