* @param node the method declaration to evaluate
* @return {@code true} if and only if an error code is generated on the passed node
* @see CompileTimeErrorCode#OPTIONAL_PARAMETER_IN_OPERATOR
*/
private boolean checkForOptionalParameterInOperator(MethodDeclaration node) {
FormalParameterList parameterList = node.getParameters();
if (parameterList == null) {
return false;
}
boolean foundError = false;
NodeList<FormalParameter> formalParameters = parameterList.getParameters();
for (FormalParameter formalParameter : formalParameters) {
if (formalParameter.getKind().isOptional()) {
errorReporter.reportErrorForNode(
CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR,
formalParameter);