"Remove parameter" quick fix makes generic function call incompilable when type could be inferred from removed parameter only
#KT-23511 Fixed
This commit is contained in:
committed by
Alexey Sedunov
parent
8271e85dbb
commit
1d0a11cecd
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
fun <X> foo(<caret>x: X) {}
|
||||
|
||||
fun test() {
|
||||
foo(x = 1)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
fun foo(<caret>) {}
|
||||
|
||||
fun test() {
|
||||
foo()
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
fun <X> foo(<caret>x: X, x2: X) {}
|
||||
|
||||
fun test() {
|
||||
foo(x = 1, x2 = 2)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
fun <X> foo(<caret>x2: X) {}
|
||||
|
||||
fun test() {
|
||||
foo(x2 = 2)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
fun <X, Y> foo(<caret>x: X, y: Y) {}
|
||||
|
||||
fun test() {
|
||||
foo(x = 1, y = 2)
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
fun <Y> foo(<caret>y: Y) {}
|
||||
|
||||
fun test() {
|
||||
foo(y = 2)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
class Bar<X> {
|
||||
fun foo(<caret>x: X) {}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
class Bar<X> {
|
||||
fun foo(<caret>) {}
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
class Foo<X>(<caret>x: X)
|
||||
|
||||
val foo = Foo(1)
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
class Foo<caret>
|
||||
|
||||
val foo = Foo()
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
class Foo<X> {
|
||||
constructor(<caret>x: X)
|
||||
}
|
||||
|
||||
val foo = Foo(1)
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove parameter 'x'" "true"
|
||||
class Foo {
|
||||
constructor(<caret>)
|
||||
}
|
||||
|
||||
val foo = Foo()
|
||||
Reference in New Issue
Block a user