@Override
	@SuppressWarnings({"checkstyle:cyclomaticcomplexity", "checkstyle:npathcomplexity"})
	protected void doCheckFunctionOverrides(EObject sourceElement, IResolvedOperation resolved,
			List<IResolvedOperation> allInherited) {
		boolean overrideProblems = false;
		List<IResolvedOperation> exceptionMismatch = null;
		for (final IResolvedOperation inherited: allInherited) {
			if (inherited.getOverrideCheckResult().hasProblems()) {
				overrideProblems = true;
				final EnumSet<OverrideCheckDetails> details = inherited.getOverrideCheckResult().getDetails();
				if (details.contains(OverrideCheckDetails.IS_FINAL)) {
					error(MessageFormat.format(Messages.SARLValidator_43, inherited.getSimpleSignature()),
							sourceElement,
							nameFeature(sourceElement), OVERRIDDEN_FINAL);
				} else if (details.contains(OverrideCheckDetails.REDUCED_VISIBILITY)) {
					error(MessageFormat.format(Messages.SARLValidator_44,
							inherited.getSimpleSignature()),
							sourceElement, nameFeature(sourceElement), OVERRIDE_REDUCES_VISIBILITY);
				} else if (details.contains(OverrideCheckDetails.EXCEPTION_MISMATCH)) {
					if (exceptionMismatch == null) {
						exceptionMismatch = Lists.newArrayListWithCapacity(allInherited.size());
					}
					exceptionMismatch.add(inherited);
				} else if (details.contains(OverrideCheckDetails.RETURN_MISMATCH)) {
					final JvmTypeReference inheritedReturnType = inherited.getOverrideCheckResult().getGivenOperation().getReturnType();
					final LightweightTypeReference resolvedReturnType = inherited.getOverrideCheckResult().getThisOperation().getResolvedReturnType();
					final String signature = inherited.getSimpleSignature();
					final EStructuralFeature sourceReturnTypeFeature = returnTypeFeature(sourceElement);
					// FIXME: The following test is due to the fact that the resource sets of the two types may be different.
					final String resolvedIdentifier = resolvedReturnType.getIdentifier();
					final String inheritedIdentifier = inheritedReturnType.getIdentifier();
					if (!Objects.equal(resolvedIdentifier, inheritedIdentifier)) {
						error(MessageFormat.format(Messages.SARLValidator_45,
								signature,
								resolvedIdentifier,
								inheritedIdentifier),
								sourceElement,
								sourceReturnTypeFeature,
								INCOMPATIBLE_RETURN_TYPE,
								resolvedIdentifier);
					}
				}
			} else if (!isIgnored(RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED, sourceElement)
					&& sourceElement instanceof SarlAction) {
				final SarlAction function = (SarlAction) sourceElement;
				if (function.getReturnType() == null && !inherited.getResolvedReturnType().isPrimitiveVoid()) {
					warning(MessageFormat.format(Messages.SARLValidator_46,
							resolved.getResolvedReturnType().getHumanReadableName()),
							sourceElement,
							returnTypeFeature(sourceElement), RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED,
							inherited.getResolvedReturnType().getIdentifier());
				}
			}
		}
		if (exceptionMismatch != null) {
			createExceptionMismatchError(resolved, sourceElement, exceptionMismatch);
		}
		if (sourceElement instanceof SarlAction) {
			final SarlAction function = (SarlAction) sourceElement;
			if (!overrideProblems && !function.isOverride() && !function.isStatic()
					&& !isIgnored(MISSING_OVERRIDE, sourceElement)) {
				warning(MessageFormat.format(Messages.SARLValidator_47,
						resolved.getSimpleSignature(),
						getDeclaratorName(resolved)),
						function,
						XTEND_FUNCTION__NAME, MISSING_OVERRIDE);
			}
			if (!overrideProblems && function.isOverride() && function.isStatic()) {
				for (final IResolvedOperation inherited: allInherited) {
					error(MessageFormat.format(Messages.SARLValidator_48,
							resolved.getSimpleSignature(),
							getDeclaratorName(resolved),
							resolved.getSimpleSignature(),
							getDeclaratorName(inherited)),
							function, XTEND_FUNCTION__NAME,
							function.getModifiers().indexOf(Messages.SARLValidator_49),
							OBSOLETE_OVERRIDE);
				}
			}
		}
	}
@ Override @ SuppressWarnings ( { "checkstyle:cyclomaticcomplexity" , "checkstyle:npathcomplexity" } ) protected void doCheckFunctionOverrides ( EObject sourceElement , IResolvedOperation resolved , List < IResolvedOperation > allInherited ) { boolean overrideProblems = false ; List < IResolvedOperation > exceptionMismatch = null ; for ( final IResolvedOperation inherited : allInherited ) { if ( inherited . getOverrideCheckResult ( ) . hasProblems ( ) ) { overrideProblems = true ; final EnumSet < OverrideCheckDetails > details = inherited . getOverrideCheckResult ( ) . getDetails ( ) ; if ( details . contains ( OverrideCheckDetails . IS_FINAL ) ) { error ( MessageFormat . format ( Messages . SARLValidator_43 , inherited . getSimpleSignature ( ) ) , sourceElement , nameFeature ( sourceElement ) , OVERRIDDEN_FINAL ) ; } else if ( details . contains ( OverrideCheckDetails . REDUCED_VISIBILITY ) ) { error ( MessageFormat . format ( Messages . SARLValidator_44 , inherited . getSimpleSignature ( ) ) , sourceElement , nameFeature ( sourceElement ) , OVERRIDE_REDUCES_VISIBILITY ) ; } else if ( details . contains ( OverrideCheckDetails . EXCEPTION_MISMATCH ) ) { if ( exceptionMismatch == null ) { exceptionMismatch = Lists . newArrayListWithCapacity ( allInherited . size ( ) ) ; } exceptionMismatch . add ( inherited ) ; } else if ( details . contains ( OverrideCheckDetails . RETURN_MISMATCH ) ) { final JvmTypeReference inheritedReturnType = inherited . getOverrideCheckResult ( ) . getGivenOperation ( ) . getReturnType ( ) ; final LightweightTypeReference resolvedReturnType = inherited . getOverrideCheckResult ( ) . getThisOperation ( ) . getResolvedReturnType ( ) ; final String signature = inherited . getSimpleSignature ( ) ; final EStructuralFeature sourceReturnTypeFeature = returnTypeFeature ( sourceElement ) ; final String resolvedIdentifier = resolvedReturnType . getIdentifier ( ) ; final String inheritedIdentifier = inheritedReturnType . getIdentifier ( ) ; if ( ! Objects . equal ( resolvedIdentifier , inheritedIdentifier ) ) { error ( MessageFormat . format ( Messages . SARLValidator_45 , signature , resolvedIdentifier , inheritedIdentifier ) , sourceElement , sourceReturnTypeFeature , INCOMPATIBLE_RETURN_TYPE , resolvedIdentifier ) ; } } } else if ( ! isIgnored ( RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED , sourceElement ) && sourceElement instanceof SarlAction ) { final SarlAction function = ( SarlAction ) sourceElement ; if ( function . getReturnType ( ) == null && ! inherited . getResolvedReturnType ( ) . isPrimitiveVoid ( ) ) { warning ( MessageFormat . format ( Messages . SARLValidator_46 , resolved . getResolvedReturnType ( ) . getHumanReadableName ( ) ) , sourceElement , returnTypeFeature ( sourceElement ) , RETURN_TYPE_SPECIFICATION_IS_RECOMMENDED , inherited . getResolvedReturnType ( ) . getIdentifier ( ) ) ; } } } if ( exceptionMismatch != null ) { createExceptionMismatchError ( resolved , sourceElement , exceptionMismatch ) ; } if ( sourceElement instanceof SarlAction ) { final SarlAction function = ( SarlAction ) sourceElement ; if ( ! overrideProblems && ! function . isOverride ( ) && ! function . isStatic ( ) && ! isIgnored ( MISSING_OVERRIDE , sourceElement ) ) { warning ( MessageFormat . format ( Messages . SARLValidator_47 , resolved . getSimpleSignature ( ) , getDeclaratorName ( resolved ) ) , function , XTEND_FUNCTION__NAME , MISSING_OVERRIDE ) ; } if ( ! overrideProblems && function . isOverride ( ) && function . isStatic ( ) ) { for ( final IResolvedOperation inherited : allInherited ) { error ( MessageFormat . format ( Messages . SARLValidator_48 , resolved . getSimpleSignature ( ) , getDeclaratorName ( resolved ) , resolved . getSimpleSignature ( ) , getDeclaratorName ( inherited ) ) , function , XTEND_FUNCTION__NAME , function . getModifiers ( ) . indexOf ( Messages . SARLValidator_49 ) , OBSOLETE_OVERRIDE ) ; } } } }
Caution: This function is overridden for translating the MISSING_OVERRIDE error into a warning,
and emit a warning when a return type should be specified.

{@inheritDoc}