mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 08:31:31 +00:00
This syntax is reserved to be likely used in the future as a shorthand for "this::foo" where the resulting expression doesn't take the receiver as a parameter but has "this" already bound to it
32 lines
644 B
Kotlin
Vendored
32 lines
644 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
|
import kotlin.reflect.KFunction1
|
|
|
|
class A {
|
|
inner class Inner
|
|
|
|
fun main() {
|
|
::<!CALLABLE_REFERENCE_TO_MEMBER_OR_EXTENSION_WITH_EMPTY_LHS!>Inner<!>
|
|
val y = A::Inner
|
|
|
|
checkSubtype<KFunction1<A, Inner>>(y)
|
|
}
|
|
|
|
companion object {
|
|
fun main() {
|
|
::<!UNRESOLVED_REFERENCE!>Inner<!>
|
|
val y = A::Inner
|
|
|
|
checkSubtype<KFunction1<A, A.Inner>>(y)
|
|
}
|
|
}
|
|
}
|
|
|
|
class B {
|
|
fun main() {
|
|
::<!UNRESOLVED_REFERENCE!>Inner<!>
|
|
val y = A::Inner
|
|
|
|
checkSubtype<KFunction1<A, A.Inner>>(y)
|
|
}
|
|
} |