Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/extensionInClassDisallowed.kt
T
Alexander Udalov d40906a690 Disallow references to extensions in classes
It's not clear in which order should the two receiver arguments be passed to
them, and there's no corresponding K*FunctionN class for now

 #KT-1183 In Progress
2013-04-22 17:59:31 +04:00

15 lines
358 B
Kotlin

class A {
fun Int.extInt() = 42
fun A.extA(x: String) = x
fun main() {
::<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>extInt<!>
::<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>extA<!>
}
}
fun main() {
A::<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>extInt<!>
A::<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>extA<!>
}