Files
kotlin-fork/idea/testData/quickfix/autoImports/invokeExtension2.test
T
2019-09-24 16:27:09 +07:00

43 lines
735 B
Plaintext
Vendored

// FILE: first.before.kt
// "Import" "true"
// ERROR: Expression 'a' of type 'A' cannot be invoked as a function. The function 'invoke()' is not found
package b
import a.A
fun main() {
val a = A()
<caret>a()
}
//-----------------------
// FILE: second.kt
// "Import" "true"
// ERROR: Expression 'a' of type 'A' cannot be invoked as a function. The function 'invoke()' is not found
package a
class A
operator fun A.invoke() = 42
//-----------------------
// FILE: first.after.kt
// "Import" "true"
// ERROR: Expression 'a' of type 'A' cannot be invoked as a function. The function 'invoke()' is not found
package b
import a.A
import a.invoke
fun main() {
val a = A()
<caret>a()
}
//-----------------------