mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 08:31:29 +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
434 B
Kotlin
Vendored
16 lines
434 B
Kotlin
Vendored
// !DIAGNOSTICS: -UNUSED_EXPRESSION
|
|
class A {
|
|
fun Int.extInt() = 42
|
|
fun A.extA(x: String) = x
|
|
|
|
fun main() {
|
|
Int::<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>extInt<!>
|
|
A::<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>extA<!>
|
|
}
|
|
}
|
|
|
|
fun main() {
|
|
A::<!MISSING_RECEIVER, EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>extInt<!>
|
|
A::<!MISSING_RECEIVER, EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>extA<!>
|
|
}
|