Fix import member quickfix to check receiver

#KT-17037 fixed
This commit is contained in:
Simon Ogorodnik
2017-04-11 16:10:31 +03:00
parent a47bc1492d
commit c6cdbe7eed
4 changed files with 39 additions and 2 deletions
@@ -0,0 +1,7 @@
package some
object AAA {
operator fun plus(i: Int): Int {
return 42
}
}
@@ -0,0 +1,12 @@
// "class org.jetbrains.kotlin.idea.quickfix.ImportFix" "false"
// ERROR: Unresolved reference. None of the following candidates is applicable because of receiver type mismatch: <br>public operator fun String?.plus(other: Any?): String defined in kotlin
// ACTION: Create extension function 'JustClass.plus'
// ACTION: Create member function 'JustClass.plus'
// ACTION: Flip '+'
// ACTION: Replace overloaded operator with function call
class JustClass
fun some() {
val x = JustClass() +<caret> 1
}