mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 15:53:40 +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
22 lines
407 B
Kotlin
Vendored
22 lines
407 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
|
import kotlin.reflect.KFunction1
|
|
|
|
class A {
|
|
inner class Inner
|
|
}
|
|
|
|
fun A.main() {
|
|
::<!CALLABLE_REFERENCE_TO_MEMBER_OR_EXTENSION_WITH_EMPTY_LHS!>Inner<!>
|
|
val y = A::Inner
|
|
|
|
checkSubtype<KFunction1<A, A.Inner>>(y)
|
|
}
|
|
|
|
fun Int.main() {
|
|
::<!UNRESOLVED_REFERENCE!>Inner<!>
|
|
val y = A::Inner
|
|
|
|
checkSubtype<KFunction1<A, A.Inner>>(y)
|
|
}
|