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
+31
@@ -0,0 +1,31 @@
|
||||
// FILE: first.before.kt
|
||||
// "Import" "false"
|
||||
// ERROR: Unresolved reference: foo()["str"]
|
||||
// ERROR: No get method providing array access
|
||||
// ACTION: Create extension function 'get'
|
||||
// ACTION: Create member function 'get'
|
||||
// ACTION: Replace overloaded operator with function call
|
||||
|
||||
|
||||
package testing
|
||||
|
||||
import some.Some
|
||||
|
||||
fun foo(): Some = Some()
|
||||
|
||||
fun testing() {
|
||||
foo()<caret>["str"]
|
||||
}
|
||||
|
||||
|
||||
|
||||
// FILE: second.kt
|
||||
package some
|
||||
|
||||
public class Some
|
||||
|
||||
operator fun Some.set(s: String) {}
|
||||
|
||||
|
||||
// FILE: first.after.kt
|
||||
// Empty File
|
||||
Reference in New Issue
Block a user