KT-5629 Quickfix to import extension method when arguments of non-extension method do not match

#KT-5629 fixed
This commit is contained in:
Simon Ogorodnik
2017-01-12 16:31:23 +03:00
parent f8f73d338b
commit 4b3cf432dc
6 changed files with 47 additions and 1 deletions
@@ -0,0 +1,10 @@
// "Import" "true"
// ERROR: None of the following functions can be called with the arguments supplied: <br>public final fun buz(i: Int, l: Int): Unit defined in lib.Bar<br>public final fun buz(i: Int, m: M): Unit defined in lib.Bar
import lib.Bar
import lib.buz
fun useSite() {
val bar = Bar()
bar.buz<caret>("1", "2")
}
@@ -0,0 +1,18 @@
package lib
class M
class Bar {
fun buz(i: Int, m: M) {
}
fun buz(i: Int, l: Int) {
}
}
fun Bar.buz(s: String, i: String) {
}
@@ -0,0 +1,9 @@
// "Import" "true"
// ERROR: None of the following functions can be called with the arguments supplied: <br>public final fun buz(i: Int, l: Int): Unit defined in lib.Bar<br>public final fun buz(i: Int, m: M): Unit defined in lib.Bar
import lib.Bar
fun useSite() {
val bar = Bar()
bar.buz<caret>("1", "2")
}