Files
kotlin-fork/compiler/testData/diagnostics/tests/callableReference/function/extensionInClassDisallowed.fir.kt
T
2020-04-08 10:38:45 +03:00

21 lines
436 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_EXPRESSION
class A {
fun Int.extInt() = 42
fun A.extA(x: String) = x
fun main() {
<!UNRESOLVED_REFERENCE!>Int::extInt<!>
A::extA
<!INAPPLICABLE_CANDIDATE!>eat<!>(<!UNRESOLVED_REFERENCE!>Int::extInt<!>)
eat(A::extA)
}
}
fun eat(value: Any) {}
fun main() {
<!UNRESOLVED_REFERENCE!>A::extInt<!>
<!UNRESOLVED_REFERENCE!>A::extA<!>
}