DeprecatedSymbolUsageFix: keeping functional literal arguments out of parenthesis

This commit is contained in:
Valentin Kipyatkov
2015-05-22 14:07:16 +03:00
parent 36f41c6d13
commit 161630a449
9 changed files with 137 additions and 5 deletions
@@ -52,6 +52,7 @@ public object OptionalParametersHelper {
val arguments = resolvedCall.getCall().getValueArguments()
val argumentsToDrop = ArrayList<ValueArgument>()
//TODO: can drop arguments leaving last functional literal one (outside of parenthesis)
for (argument in arguments.reverse()) {
if (!canDrop(argument)) break // TODO: not correct because of named arguments
if (!argument.matchesDefault(resolvedCall, parameterToDefaultValue)) break // TODO: not correct because of named arguments