Class AmbiguousCallArgumentsOrError
java.lang.Object
org.ek9lang.compiler.phase5.AmbiguousCallArgumentsOrError
- All Implemented Interfaces:
Consumer<EK9Parser.ParamExpressionContext>
final class AmbiguousCallArgumentsOrError
extends Object
implements Consumer<EK9Parser.ParamExpressionContext>
Checks call sites for ambiguous positional arguments.
Two rules are enforced:
- Rule 12a (E11061): 2+ Boolean literal arguments require named arguments
- Rule 12b (E11062): 4+ positional arguments require named arguments
Both diagnostics carry the parameter names the CALLED method declares, in order
(ErrorDetails.getDeclaredParameterNames()). This rule is the only place that holds the
resolved method at the moment the error is raised, and the fix is nothing more than those names
in that order - so it encodes them rather than leaving every consumer to re-resolve the call
from its text. The MCP editors use them to LABEL the call rather than refuse it.
-
Constructor Summary
ConstructorsConstructorDescriptionAmbiguousCallArgumentsOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
-
Constructor Details
-
AmbiguousCallArgumentsOrError
AmbiguousCallArgumentsOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<EK9Parser.ParamExpressionContext>
-