Auto-imports for index functions, += like operators, invoke, delegates and components
#KT-9482 Fixed #KT-9397 Fixed #KT-8060 Fixed
This commit is contained in:
committed by
Nikolay Krasko
parent
0f85d770dd
commit
2f26480e6b
@@ -0,0 +1,41 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
|
||||
|
||||
package testing
|
||||
|
||||
import some.Some
|
||||
|
||||
fun testing() {
|
||||
<caret>Some()("str")
|
||||
}
|
||||
//-----------------------
|
||||
|
||||
|
||||
// FILE: second.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
|
||||
|
||||
package some
|
||||
|
||||
public class Some
|
||||
|
||||
operator fun Some.invoke(s: String) {}
|
||||
//-----------------------
|
||||
|
||||
|
||||
// FILE: first.after.kt
|
||||
// "Import" "true"
|
||||
// ERROR: Expression 'Some()' of type 'some.Some' cannot be invoked as a function. The function invoke() is not found
|
||||
|
||||
package testing
|
||||
|
||||
import some.Some
|
||||
import some.invoke
|
||||
|
||||
fun testing() {
|
||||
<caret>Some()("str")
|
||||
}
|
||||
//-----------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user