Class ValidNamedArgumentsOrError

java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.phase3.ValidNamedArgumentsOrError
All Implemented Interfaces:
BiConsumer<EK9Parser.ParamExpressionContext,List<ISymbol>>

final class ValidNamedArgumentsOrError extends RuleSupport implements BiConsumer<EK9Parser.ParamExpressionContext,List<ISymbol>>
If the Ek9 developer has used named parameters, then they must be validated.

There won't even be a symbol match if the wrong number or type of argument have been employed. So that error condition will have been identified in earlier phases.

But if there are arguments and they are named then they must be named correctly and in the right order. EK9 does not support missing arguments (even when named). Nor does it support passing arguments in a different order to declaration.

The main purpose of named arguments, is to support a more obvious and declarative syntax when large numbers of arguments are used.