mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +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
16 lines
252 B
Kotlin
Vendored
16 lines
252 B
Kotlin
Vendored
// !CHECK_TYPE
|
|
|
|
import kotlin.reflect.KFunction1
|
|
|
|
fun foo() {}
|
|
|
|
class A {
|
|
fun foo() {}
|
|
|
|
fun main() {
|
|
val x = ::<!CALLABLE_REFERENCE_TO_MEMBER_OR_EXTENSION_WITH_EMPTY_LHS!>foo<!>
|
|
|
|
checkSubtype<KFunction1<A, Unit>>(x)
|
|
}
|
|
}
|