Fix import member quickfix to check receiver
#KT-17037 fixed
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
package some
|
||||
|
||||
object AAA {
|
||||
operator fun plus(i: Int): Int {
|
||||
return 42
|
||||
}
|
||||
}
|
||||
+12
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user