Extension operator function should be automatically imported for java function with the same name (KT-9406)

There's no need to import extension for Java operators anymore. Import for Kotlin functions.

 #KT-9406 Fixed
This commit is contained in:
Nikolay Krasko
2015-10-26 01:58:30 +03:00
parent 4ce87665c3
commit f518f5fb9f
5 changed files with 123 additions and 4 deletions
@@ -0,0 +1,42 @@
// FILE: first.before.kt
// "Import" "true"
package testing
import some.Some
fun foo(): Some = Some()
fun testing() {
foo()<caret>["str"]
}
// FILE: second.kt
package some
public class Some {
fun get(s: String) {}
}
operator fun Some.get(s: String) {}
// FILE: first.after.kt
// "Import" "true"
package testing
import some.Some
import some.get
fun foo(): Some = Some()
fun testing() {
foo()<caret>["str"]
}