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
@@ -62,6 +62,10 @@ fun Call.mapArgumentsToParameters(targetDescriptor: CallableDescriptor): Map<Val
val parameter = parametersByName[argumentName]
if (parameter != null) {
map[argument] = parameter
if (parameter.index == positionalArgumentIndex) {
positionalArgumentIndex++
continue
}
}
positionalArgumentIndex = null
} else {