Support "::foo" as a short-hand for "this::foo"
#KT-15667 Fixed
This commit is contained in:
Vendored
+28
@@ -0,0 +1,28 @@
|
||||
// !LANGUAGE: -CallableReferencesToClassMembersWithEmptyLHS
|
||||
|
||||
class A {
|
||||
fun memberFunction() {}
|
||||
val memberProperty: Int get() = 42
|
||||
|
||||
fun test() {
|
||||
(::<!UNSUPPORTED_FEATURE!>memberFunction<!>)()
|
||||
(::<!UNSUPPORTED_FEATURE!>extensionFunction<!>)()
|
||||
(::<!UNSUPPORTED_FEATURE!>memberProperty<!>)()
|
||||
(::<!UNSUPPORTED_FEATURE!>extensionProperty<!>)()
|
||||
}
|
||||
|
||||
inner class B {
|
||||
fun memberFunction() { }
|
||||
val memberProperty: Int get() = 43
|
||||
|
||||
fun test() {
|
||||
(::<!UNSUPPORTED_FEATURE!>memberFunction<!>)()
|
||||
(::<!UNSUPPORTED_FEATURE!>extensionFunction<!>)()
|
||||
(::<!UNSUPPORTED_FEATURE!>memberProperty<!>)()
|
||||
(::<!UNSUPPORTED_FEATURE!>extensionProperty<!>)()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun A.extensionFunction() {}
|
||||
val A.extensionProperty: Int get() = 44
|
||||
Reference in New Issue
Block a user