Class UnusedParameterOrError
java.lang.Object
org.ek9lang.compiler.phase5.UnusedParameterOrError
- All Implemented Interfaces:
Consumer<org.antlr.v4.runtime.tree.ParseTree>
final class UnusedParameterOrError
extends Object
implements Consumer<org.antlr.v4.runtime.tree.ParseTree>
Detects unused parameters in functions, methods, constructors, and service operations (E08091).
Parameters that are declared but never referenced in the body indicate dead code, incomplete implementation, or a signature that should be simplified.
Exemptions (parameters forced by contract):
- Abstract methods/functions - no body to reference parameters in
- Override methods - signature forced by parent class or trait
- Dispatcher methods - must accept dispatched type
- Dispatcher handler methods - signature forced by dispatch pattern
- Operators - finite number with strict semantics
- Functions explicitly extending another function (identifierReference in grammar)
- Methods on parameterised types - signature forced by generic type contract
- Defaulted (compiler-generated) methods/operators
- Externally implemented (Java-backed) methods/functions
-
Constructor Summary
ConstructorsConstructorDescriptionUnusedParameterOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener) -
Method Summary
-
Constructor Details
-
UnusedParameterOrError
UnusedParameterOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
-
-
Method Details
-
accept
-