"Add parameter to function" for TYPE_MISMATCH: fix it works correctly for extension function

#KT-39557
This commit is contained in:
Toshiaki Kameyama
2020-06-13 10:32:17 +09:00
committed by Yan Zhulanow
parent 6515d53b94
commit 03e725d5da
12 changed files with 23 additions and 9 deletions
@@ -0,0 +1,8 @@
// "Add 2nd parameter to function 'bar'" "true"
interface Foo
private fun Foo.bar(s: String, i: Int) {}
fun test(foo: Foo, b: Boolean) {
foo.bar("", b<caret>, 0)
}
@@ -0,0 +1,8 @@
// "Add 2nd parameter to function 'bar'" "true"
interface Foo
private fun Foo.bar(s: String, b: Boolean, i: Int) {}
fun test(foo: Foo, b: Boolean) {
foo.bar("", b, 0)
}
@@ -1,5 +1,4 @@
// "Add 1st parameter to function 'foo'" "true"
// DISABLE-ERRORS
fun foo(i1: Int, i2: Int, i3: Int, i4: Int) {
}
@@ -1,5 +1,4 @@
// "Add 1st parameter to function 'foo'" "true"
// DISABLE-ERRORS
fun foo(i11: String, i1: Int, i2: Int, i3: Int, i4: Int) {
}
@@ -1,5 +1,4 @@
// "Add 2nd parameter to function 'foo'" "true"
// DISABLE-ERRORS
fun foo(i1: Int, i2: Int, i3: Int, i4: Int) {
}
@@ -1,5 +1,4 @@
// "Add 2nd parameter to function 'foo'" "true"
// DISABLE-ERRORS
fun foo(i1: Int, i21: String, i2: Int, i3: Int, i4: Int) {
}
@@ -1,5 +1,4 @@
// "Add 3rd parameter to function 'foo'" "true"
// DISABLE-ERRORS
fun foo(i1: Int, i2: Int, i3: Int, i4: Int) {
}
@@ -1,5 +1,4 @@
// "Add 3rd parameter to function 'foo'" "true"
// DISABLE-ERRORS
fun foo(i1: Int, i2: Int, i31: String, i3: Int, i4: Int) {
}
@@ -1,5 +1,4 @@
// "Add 4th parameter to function 'foo'" "true"
// DISABLE-ERRORS
fun foo(i1: Int, i2: Int, i3: Int, i4: Int) {
}
@@ -1,5 +1,4 @@
// "Add 4th parameter to function 'foo'" "true"
// DISABLE-ERRORS
fun foo(i1: Int, i2: Int, i3: Int, i41: String, i4: Int) {
}