Class MethodNotOperatorOrError

java.lang.Object
org.ek9lang.compiler.common.RuleSupport
org.ek9lang.compiler.phase1.MethodNotOperatorOrError
All Implemented Interfaces:
Consumer<MethodSymbol>

final class MethodNotOperatorOrError extends RuleSupport implements Consumer<MethodSymbol>
Just checks that named operator methods: mod, rem, abs, sqrt, close, contains, matches, empty, length are not being used as just method names. They are reserved for operators and the semantics that go with those operators. While they could be used with different arguments/parameters - this might be confusing.

THE check for every kind of method a developer names: an ordinary method, a text body and a service operation. A text body or service operation named like an operator word (close(), length()) was never checked: it compiled clean and its call was mapped to the operator's JVM name (_close), which the class did not have - NoSuchMethodError at run time (front-end audit FE33).