Class NoDelegateMethodClashesOrError

All Implemented Interfaces:
Consumer<ISymbol>

final class NoDelegateMethodClashesOrError extends TypedSymbolAccess implements Consumer<ISymbol>
As it is possible to have a variable that is a delegate 'function', it means that to call that function, the ek9 developer would use variable-name(parameters). This is identical in calling a method, if the ek9 developer had methods of the same name as the variable - this would be very confusing. Does a method take precedence?, what would haven if some methods became protected or public. So to avoid all that - we just issue an error and force the ek9 developer to use either a different delegate name or different method names. This could lead to a case where two separate components like a trait and a class could not be used together. The answer would be to employ delegation rather than use inheritance.
  • Constructor Details

    • NoDelegateMethodClashesOrError

      NoDelegateMethodClashesOrError(SymbolsAndScopes symbolsAndScopes, ErrorListener errorListener)
      Create a new delegate checker.
  • Method Details