KT-35258 Add better completion for MixedNamedArgumentsInTheirOwnPosition feature

- When named parameter is on its own position, the completion of the next argument will not be limited by named arguments only
- The completion will not suggest already used arguments names
- ^KT-35258 Fixed
This commit is contained in:
Roman Golyshev
2019-12-25 19:40:10 +03:00
committed by Roman Golyshev
parent bd713db70e
commit 4b50fb18fb
9 changed files with 106 additions and 4 deletions
@@ -0,0 +1,10 @@
fun foo(p1: Int, p2: Int, p3: Long) {}
fun usage(param: Long) {
foo(p2 = 10, <caret>)
}
// LANGUAGE_VERSION: 1.4
// EXIST: { itemText: "p1 =" }
// EXIST: { itemText: "p3 =" }
// NOTHING_ELSE
@@ -0,0 +1,11 @@
fun foo(p1: Int, p2: Int, p3: Long) {}
fun usage(param: Long) {
foo(p1 = 10, <caret>)
}
// LANGUAGE_VERSION: 1.4
// EXIST: param
// EXIST: { itemText: "p2 =" }
// EXIST: { itemText: "p3 =" }
// ABSENT: { itemText: "p1 =" }
@@ -0,0 +1,13 @@
fun foo(p1: Int, p2: Int, p3: Int, p4: Int, p5: Int) {}
fun usage(param: Int) {
foo(0, p2 = 10, 20, p4 = 30, <caret>)
}
// LANGUAGE_VERSION: 1.4
// EXIST: param
// EXIST: { itemText: "p5 =" }
// ABSENT: { itemText: "p1 =" }
// ABSENT: { itemText: "p2 =" }
// ABSENT: { itemText: "p3 =" }
// ABSENT: { itemText: "p4 =" }