anchor.diff:        // of the return type.  So no need to do any further checking.
         return;
       }
  -    if (_options.strongMode) {
  -      if (returnExpression == null) {
  -        return; // Empty returns are handled elsewhere
  -      }
  -
  -      DartType expressionType = getStaticType(returnExpression);
  -
  -      void reportTypeError() {
  -        String displayName = _enclosingFunction.displayName;
  -
  -        if (displayName.isEmpty) {
  -          _errorReporter.reportTypeErrorForNode(
  -              StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
  -              returnExpression,
  -              [expressionType, expectedType]);
  -        } else {
  -          _errorReporter.reportTypeErrorForNode(
  -              StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
  -              returnExpression,
  -              [expressionType, expectedType, displayName]);
  -        }
  -      }
  -
  -      var toType = expectedType;
  -      var fromType = expressionType;
  -      if (_inAsync) {
  -        toType = toType.flattenFutures(_typeSystem);
  -        fromType = fromType.flattenFutures(_typeSystem);
  -      }
  -
  -      // Anything can be returned to `void` in an arrow bodied function
  -      // or to `Future<void>` in an async arrow bodied function.
  -      if (isArrowFunction && toType.isVoid) {
  +    if (returnExpression == null) {
  +      return; // Empty returns are handled elsewhere
  +    }
  +
  +    DartType expressionType = getStaticType(returnExpression);
  +
  +    void reportTypeError() {
  +      String displayName = _enclosingFunction.displayName;
  +
  +      if (displayName.isEmpty) {
  +        _errorReporter.reportTypeErrorForNode(
  +            StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
  +            returnExpression,
  +            [expressionType, expectedType]);
  +      } else {
  +        _errorReporter.reportTypeErrorForNode(
  +            StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
  +            returnExpression,
  +            [expressionType, expectedType, displayName]);
  +      }
  +    }
  +
  +    var toType = expectedType;
  +    var fromType = expressionType;
  +    if (_inAsync) {
  +      toType = toType.flattenFutures(_typeSystem);
  +      fromType = fromType.flattenFutures(_typeSystem);
  +    }
  +
  +    // Anything can be returned to `void` in an arrow bodied function
  +    // or to `Future<void>` in an async arrow bodied function.
  +    if (isArrowFunction && toType.isVoid) {
  +      return;
  +    }
  +
  +    // Anything can be returned to `dynamic`, or to `Future<dynamic>` in
  +    // an async function.
  +    if (toType.isDynamic) {
  +      return;
  +    }
  +
  +    // Anything can be return to `Future<Null>` in an async function
  +    if (_inAsync && toType.isDartCoreNull) {
  +      return;
  +    }
  +
  +    // If we're not in one of the `void` related special cases
  +    // just check assignability.
  +    if (!expectedType.isVoid && !fromType.isVoid) {
  +      var checkWithType = (!_inAsync)
  +          ? fromType
  +          : _typeProvider.futureType.instantiate(<DartType>[fromType]);
  +      if (_expressionIsAssignableAtType(
  +          returnExpression, checkWithType, expectedType)) {
           return;
         }
  -
  -      // Anything can be returned to `dynamic`, or to `Future<dynamic>` in
  -      // an async function.
  -      if (toType.isDynamic) {
  -        return;
  -      }
  -
  -      // Anything can be return to `Future<Null>` in an async function
  -      if (_inAsync && toType.isDartCoreNull) {
  -        return;
  -      }
  -
  -      // If we're not in one of the `void` related special cases
  -      // just check assignability.
  -      if (!expectedType.isVoid && !fromType.isVoid) {
  -        var checkWithType = (!_inAsync)
  -            ? fromType
  -            : _typeProvider.futureType.instantiate(<DartType>[fromType]);
  -        if (_expressionIsAssignableAtType(
  -            returnExpression, checkWithType, expectedType)) {
  +    }
  +
  +    // Void related special cases.  If the expression type flattens
  +    // to `void`, and the expected type doesn't, then it's an error.
  +    // Otherwise:
  +    if (toType.isVoid) {
  +      // In the case that the expected type is `void`
  +      if (expectedType.isVoid) {
  +        // Valid if the expression type is void, dynamic or Null
  +        if (expressionType.isVoid ||
  +            expressionType.isDynamic ||
  +            expressionType.isDartCoreNull ||
  +            expressionType.isBottom) {
             return;
           }
  -      }
  -
  -      // Void related special cases.  If the expression type flattens
  -      // to `void`, and the expected type doesn't, then it's an error.
  -      // Otherwise:
  -      if (toType.isVoid) {
  -        // In the case that the expected type is `void`
  -        if (expectedType.isVoid) {
  -          // Valid if the expression type is void, dynamic or Null
  -          if (expressionType.isVoid ||
  -              expressionType.isDynamic ||
  -              expressionType.isDartCoreNull ||
  -              expressionType.isBottom) {
  -            return;
  -          }
  -        } else {
  -          // The expected type is Future<void> or FutureOr<void>,
  -          // and the return is valid if the expression type flattens
  -          // to void, dynamic, or Null.
  -          if (fromType.isVoid ||
  -              fromType.isDynamic ||
  -              fromType.isDartCoreNull ||
  -              fromType.isBottom) {
  -            return;
  -          }
  -        }
  -      }
  -      reportTypeError();
  -      return;
  -    }
  -    // TODO(leafp): Delete this non Dart 2 path
  -    DartType staticReturnType = _computeReturnTypeForMethod(returnExpression);
  -    String displayName = _enclosingFunction.displayName;
  -
  -    void reportTypeError() => _errorReporter.reportTypeErrorForNode(
  -        StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
  -        returnExpression,
  -        [staticReturnType, expectedType, displayName]);
  -    void reportTypeErrorFromClosure() => _errorReporter.reportTypeErrorForNode(
  -        StaticTypeWarningCode.RETURN_OF_INVALID_TYPE_FROM_CLOSURE,
  -        returnExpression,
  -        [staticReturnType, expectedType]);
  -
  -    if (expectedType.isVoid) {
  -      if (isArrowFunction) {
  -        // "void f(..) => e" admits all types for "e".
  -        return;
  -      }
  -      if (staticReturnType.isVoid ||
  -          staticReturnType.isDynamic ||
  -          staticReturnType.isBottom ||
  -          staticReturnType.isDartCoreNull) {
  -        return;
  -      }
  -      if (displayName.isEmpty) {
  -        reportTypeErrorFromClosure();
         } else {
  -        reportTypeError();
  -      }
  -      return;
  -    }
  -
  -    // TODO(mfairhurst) Make this stricter once codebases are compliant.
  -    final invalidVoidReturn = staticReturnType.isVoid &&
  -        !(expectedType.isVoid || expectedType.isDynamic);
  -    if (!invalidVoidReturn &&
  -        _expressionIsAssignableAtType(
  -            returnExpression, staticReturnType, expectedType)) {
  -      return;
  -    }
  -    if (displayName.isEmpty) {
  -      reportTypeErrorFromClosure();
  -    } else {
  -      reportTypeError();
  -    }
  -
  -    // TODO(brianwilkerson) Define a hint corresponding to the warning and
  -    // report it if appropriate.
  -//        Type propagatedReturnType = returnExpression.getPropagatedType();
  -//        boolean isPropagatedAssignable = propagatedReturnType.isAssignableTo(expectedReturnType);
  -//        if (isStaticAssignable || isPropagatedAssignable) {
  -//          return false;
  -//        }
  -//        errorReporter.reportTypeErrorForNode(
  -//            StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
  -//            returnExpression,
  -//            staticReturnType,
  -//            expectedReturnType,
  -//            enclosingFunction.getDisplayName());
  -//        return true;
  +        // The expected type is Future<void> or FutureOr<void>,
  +        // and the return is valid if the expression type flattens
  +        // to void, dynamic, or Null.
  +        if (fromType.isVoid ||
  +            fromType.isDynamic ||
  +            fromType.isDartCoreNull ||
  +            fromType.isBottom) {
  +          return;
  +        }
  +      }
  +    }
  +    reportTypeError();
     }
   
     /**
  
positive.code:             [names[0], names[1], names.length - 2]);
        }
      }
    }
  
    /**
     * Check the given [derivedElement] against override-error codes. The
     * [baseElement] is the element that the executable element is
     * overriding. The [parameters] is the parameters of the executable element.
     * The [errorNameTarget] is the node to report problems on.
     *
     * See [CompileTimeErrorCode.INVALID_OVERRIDE_REQUIRED],
     * [CompileTimeErrorCode.INVALID_OVERRIDE_POSITIONAL],
     * [CompileTimeErrorCode.INVALID_OVERRIDE_NAMED],
     * [StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE],
     * [StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE],
     * [StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE],
     * [StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE],
     * [StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE],
     * [StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE], and
     * [StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES].
     */
    bool _checkForAllInvalidOverrideErrorCodes(
        ExecutableElement derivedElement,
        ExecutableElement baseElement,
        List<ParameterElement> parameters,
        List<AstNode> parameterLocations,
        SimpleIdentifier errorNameTarget) {
      if (_options.strongMode) {
        return false; // strong mode already checked for this
      }
  
      bool isGetter = false;
      bool isSetter = false;
      if (derivedElement is PropertyAccessorElement) {
        isGetter = derivedElement.isGetter;
        isSetter = derivedElement.isSetter;
      }
      String executableElementName = derivedElement.name;
      FunctionType derivedFT = derivedElement.type;
      FunctionType baseFT = baseElement.type;
      InterfaceType enclosingType = _enclosingClass.type;
      baseFT = _inheritanceManager.substituteTypeArgumentsInMemberFromInheritance(
          baseFT, executableElementName, enclosingType);
      if (derivedFT == null || baseFT == null) {
        return false;
      }
  
      // Handle generic function type parameters.
      // TODO(jmesserly): this duplicates some code in isSubtypeOf and most of
      // _isGenericFunctionSubtypeOf. Ideally, we'd let TypeSystem produce
      // an error message once it's ready to "return false".
      if (!derivedFT.typeFormals.isEmpty) {
        if (baseFT.typeFormals.isEmpty) {
          derivedFT = _typeSystem.instantiateToBounds(derivedFT);
        } else {
          List<TypeParameterElement> params1 = derivedFT.typeFormals;
          List<TypeParameterElement> params2 = baseFT.typeFormals;
          int count = params1.length;
          if (params2.length != count) {
            _errorReporter.reportErrorForNode(
                HintCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETERS,
                errorNameTarget, [
              count,
              params2.length,
              baseElement.enclosingElement.displayName
            ]);
            return true;
          }
          // We build up a substitution matching up the type parameters
          // from the two types, {variablesFresh/variables1} and
          // {variablesFresh/variables2}
          List<DartType> variables1 = new List<DartType>();
          List<DartType> variables2 = new List<DartType>();
          List<DartType> variablesFresh = new List<DartType>();
          for (int i = 0; i < count; i++) {
            TypeParameterElement p1 = params1[i];
            TypeParameterElement p2 = params2[i];
            TypeParameterElementImpl pFresh =
                new TypeParameterElementImpl(p1.name, -1);
  
            DartType variable1 = p1.type;
            DartType variable2 = p2.type;
            DartType variableFresh = new TypeParameterTypeImpl(pFresh);
  
            variables1.add(variable1);
            variables2.add(variable2);
            variablesFresh.add(variableFresh);
            DartType bound1 = p1.bound ?? DynamicTypeImpl.instance;
            DartType bound2 = p2.bound ?? DynamicTypeImpl.instance;
            bound1 = bound1.substitute2(variablesFresh, variables1);
            bound2 = bound2.substitute2(variablesFresh, variables2);
            pFresh.bound = bound2;
            if (!_typeSystem.isSubtypeOf(bound2, bound1)) {
              _errorReporter.reportErrorForNode(
                  HintCode.INVALID_METHOD_OVERRIDE_TYPE_PARAMETER_BOUND,
                  errorNameTarget, [
                p1.displayName,
                p1.bound,
                p2.displayName,
                p2.bound,
                baseElement.enclosingElement.displayName
              ]);
              return true;
            }
          }
          // Proceed with the rest of the checks, using instantiated types.
          derivedFT = derivedFT.instantiate(variablesFresh);
          baseFT = baseFT.instantiate(variablesFresh);
        }
      }
  
      DartType derivedFTReturnType = derivedFT.returnType;
      DartType baseFTReturnType = baseFT.returnType;
      List<DartType> derivedNormalPT = derivedFT.normalParameterTypes;
      List<DartType> baseNormalPT = baseFT.normalParameterTypes;
      List<DartType> derivedPositionalPT = derivedFT.optionalParameterTypes;
      List<DartType> basePositionalPT = baseFT.optionalParameterTypes;
      Map<String, DartType> derivedNamedPT = derivedFT.namedParameterTypes;
      Map<String, DartType> baseNamedPT = baseFT.namedParameterTypes;
      // CTEC.INVALID_OVERRIDE_REQUIRED, CTEC.INVALID_OVERRIDE_POSITIONAL and
      // CTEC.INVALID_OVERRIDE_NAMED
      if (derivedNormalPT.length > baseNormalPT.length) {
        _errorReporter.reportErrorForNode(
            StaticWarningCode.INVALID_OVERRIDE_REQUIRED, errorNameTarget, [
          baseNormalPT.length,
          baseElement,
          baseElement.enclosingElement.displayName
        ]);
        return true;
      }
      if (derivedNormalPT.length + derivedPositionalPT.length <
          basePositionalPT.length + baseNormalPT.length) {
        _errorReporter.reportErrorForNode(
            StaticWarningCode.INVALID_OVERRIDE_POSITIONAL, errorNameTarget, [
          basePositionalPT.length + baseNormalPT.length,
          baseElement,
          baseElement.enclosingElement.displayName
        ]);
        return true;
      }
      // For each named parameter in the overridden method, verify that there is
      // the same name in the overriding method.
      for (String overriddenParamName in baseNamedPT.keys) {
        if (!derivedNamedPT.containsKey(overriddenParamName)) {
          // The overridden method expected the overriding method to have
          // overridingParamName, but it does not.
          _errorReporter.reportErrorForNode(
              StaticWarningCode.INVALID_OVERRIDE_NAMED, errorNameTarget, [
            overriddenParamName,
            baseElement,
            baseElement.enclosingElement.displayName
          ]);
          return true;
        }
      }
      // SWC.INVALID_METHOD_OVERRIDE_RETURN_TYPE
      if (baseFTReturnType != VoidTypeImpl.instance &&
          !_typeSystem.isAssignableTo(derivedFTReturnType, baseFTReturnType)) {
        _errorReporter.reportTypeErrorForNode(
            !isGetter
                ? StaticWarningCode.INVALID_METHOD_OVERRIDE_RETURN_TYPE
                : StaticWarningCode.INVALID_GETTER_OVERRIDE_RETURN_TYPE,
            errorNameTarget,
            [
              derivedFTReturnType,
              baseFTReturnType,
              baseElement.enclosingElement.displayName
            ]);
        return true;
      }
      // SWC.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE
      if (parameterLocations == null) {
        return false;
      }
      int parameterIndex = 0;
      for (int i = 0; i < derivedNormalPT.length; i++) {
        if (!_typeSystem.isAssignableTo(baseNormalPT[i], derivedNormalPT[i])) {
          _errorReporter.reportTypeErrorForNode(
              !isSetter
                  ? StaticWarningCode.INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE
                  : StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE,
              parameterLocations[parameterIndex],
              [
                derivedNormalPT[i],
                baseNormalPT[i],
                baseElement.enclosingElement.displayName
              ]);
          return true;
        }
        parameterIndex++;
      }
      // SWC.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE
      for (int i = 0; i < basePositionalPT.length; i++) {
        if (!_typeSystem.isAssignableTo(
            basePositionalPT[i], derivedPositionalPT[i])) {
          _errorReporter.reportTypeErrorForNode(
              StaticWarningCode.INVALID_METHOD_OVERRIDE_OPTIONAL_PARAM_TYPE,
              parameterLocations[parameterIndex], [
            derivedPositionalPT[i],
            basePositionalPT[i],
            baseElement.enclosingElement.displayName
          ]);
          return true;
        }
        parameterIndex++;
      }
      // SWC.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE &
      // SWC.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES
      for (String overriddenName in baseNamedPT.keys) {
        DartType derivedType = derivedNamedPT[overriddenName];
        if (derivedType == null) {
          // Error, this is never reached- INVALID_OVERRIDE_NAMED would have been
          // created above if this could be reached.
          continue;
        }
        DartType baseType = baseNamedPT[overriddenName];
        if (!_typeSystem.isAssignableTo(baseType, derivedType)) {
          // lookup the parameter for the error to select
          ParameterElement parameterToSelect = null;
          AstNode parameterLocationToSelect = null;
          for (int i = 0; i < parameters.length; i++) {
            ParameterElement parameter = parameters[i];
            if (parameter.isNamed && overriddenName == parameter.name) {
              parameterToSelect = parameter;
              parameterLocationToSelect = parameterLocations[i];
              break;
            }
          }
          if (parameterToSelect != null) {
            _errorReporter.reportTypeErrorForNode(
                StaticWarningCode.INVALID_METHOD_OVERRIDE_NAMED_PARAM_TYPE,
                parameterLocationToSelect, [
              derivedType,
              baseType,
              baseElement.enclosingElement.displayName
            ]);
            return true;
          }
        }
      }
      // SWC.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES
      //
      // Create three lists: a list of the optional parameter ASTs
      // (FormalParameters), a list of the optional parameters elements from our
      // method, and finally a list of the optional parameter elements from the
      // method we are overriding.
      //
      bool foundError = false;
      List<AstNode> formalParameters = new List<AstNode>();
      List<ParameterElementImpl> parameterElts = new List<ParameterElementImpl>();
      List<ParameterElementImpl> overriddenParameterElts =
          new List<ParameterElementImpl>();
      List<ParameterElement> overriddenPEs = baseElement.parameters;
      for (int i = 0; i < parameters.length; i++) {
        ParameterElement parameter = parameters[i];
        if (parameter.isOptional) {
          formalParameters.add(parameterLocations[i]);
          parameterElts.add(parameter as ParameterElementImpl);
        }
      }
      for (ParameterElement parameterElt in overriddenPEs) {
        if (parameterElt.isOptional) {
          if (parameterElt is ParameterElementImpl) {
            overriddenParameterElts.add(parameterElt);
          }
        }
      }
      //
      // Next compare the list of optional parameter elements to the list of
      // overridden optional parameter elements.
      //
      if (parameterElts.length > 0) {
        if (parameterElts[0].isNamed) {
          // Named parameters, consider the names when matching the parameterElts
          // to the overriddenParameterElts
          for (int i = 0; i < parameterElts.length; i++) {
            ParameterElementImpl parameterElt = parameterElts[i];
            EvaluationResultImpl result = parameterElt.evaluationResult;
            // TODO (jwren) Ignore Object types, see Dart bug 11287
            if (_isUserDefinedObject(result)) {
              continue;
            }
            String parameterName = parameterElt.name;
            for (int j = 0; j < overriddenParameterElts.length; j++) {
              ParameterElementImpl overriddenParameterElt =
                  overriddenParameterElts[j];
              if (overriddenParameterElt.initializer == null) {
                // There is no warning if the overridden parameter has an
                // implicit default.
                continue;
              }
              String overriddenParameterName = overriddenParameterElt.name;
              if (parameterName != null &&
                  parameterName == overriddenParameterName) {
                EvaluationResultImpl overriddenResult =
                    overriddenParameterElt.evaluationResult;
                if (_isUserDefinedObject(overriddenResult)) {
                  break;
                }
                if (!result.equalValues(_typeProvider, overriddenResult)) {
                  _errorReporter.reportErrorForNode(
                      StaticWarningCode
                          .INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
                      formalParameters[i],
                      [
                        baseElement.enclosingElement.displayName,
                        baseElement.displayName,
                        parameterName
                      ]);
                  foundError = true;
                }
              }
            }
          }
        } else {
          // Positional parameters, consider the positions when matching the
          // parameterElts to the overriddenParameterElts
          for (int i = 0;
              i < parameterElts.length && i < overriddenParameterElts.length;
              i++) {
            ParameterElementImpl parameterElt = parameterElts[i];
            EvaluationResultImpl result = parameterElt.evaluationResult;
            // TODO (jwren) Ignore Object types, see Dart bug 11287
            if (_isUserDefinedObject(result)) {
              continue;
            }
            ParameterElementImpl overriddenParameterElt =
                overriddenParameterElts[i];
            if (overriddenParameterElt.initializer == null) {
              // There is no warning if the overridden parameter has an implicit
              // default.
              continue;
            }
            EvaluationResultImpl overriddenResult =
                overriddenParameterElt.evaluationResult;
            if (_isUserDefinedObject(overriddenResult)) {
              continue;
            }
            if (!result.equalValues(_typeProvider, overriddenResult)) {
              _errorReporter.reportErrorForNode(
                  StaticWarningCode
                      .INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
                  formalParameters[i],
                  [
                    baseElement.enclosingElement.displayName,
                    baseElement.displayName
                  ]);
              foundError = true;
            }
          }
        }
      }
      return foundError;
    }
  
    /**
     * Check the given [executableElement] against override-error codes. This
     * method computes the given executableElement is overriding and calls
     * [_checkForAllInvalidOverrideErrorCodes] when the [InheritanceManager]
     * returns a [MultiplyInheritedExecutableElement], this method loops through
     * the list in the [MultiplyInheritedExecutableElement]. The [parameters] are
     * the parameters of the executable element. The [errorNameTarget] is the node
     * to report problems on.
     */
    void _checkForAllInvalidOverrideErrorCodesForExecutable(
        ExecutableElement executableElement,
        List<ParameterElement> parameters,
        List<AstNode> parameterLocations,
        SimpleIdentifier errorNameTarget) {
      assert(!_options.strongMode); // strong mode already checked for these
      //
      // Compute the overridden executable from the InheritanceManager
      //
      List<ExecutableElement> overriddenExecutables = _inheritanceManager
          .lookupOverrides(_enclosingClass, executableElement.name);
      for (ExecutableElement overriddenElement in overriddenExecutables) {
        if (_checkForAllInvalidOverrideErrorCodes(executableElement,
            overriddenElement, parameters, parameterLocations, errorNameTarget)) {
          return;
        }
      }
    }
  
    /**
     * Check the given field [declaration] against override-error codes.
     *
     * See [_checkForAllInvalidOverrideErrorCodes].
     */
    void _checkForAllInvalidOverrideErrorCodesForField(
        FieldDeclaration declaration) {
      if (_options.strongMode) {
        return; // strong mode already checked for this
      }
  
      if (_enclosingClass == null || declaration.isStatic) {
        return;
      }
  
      VariableDeclarationList fields = declaration.fields;
      for (VariableDeclaration field in fields.variables) {
        FieldElement element = field.element as FieldElement;
        if (element == null) {
          continue;
        }
        PropertyAccessorElement getter = element.getter;
        PropertyAccessorElement setter = element.setter;
        SimpleIdentifier fieldName = field.name;
        if (getter != null) {
          _checkForAllInvalidOverrideErrorCodesForExecutable(
              getter, ParameterElement.EMPTY_LIST, AstNode.EMPTY_LIST, fieldName);
        }
        if (setter != null) {
          _checkForAllInvalidOverrideErrorCodesForExecutable(
              setter, setter.parameters, <AstNode>[fieldName], fieldName);
        }
      }
    }
  
    /**
     * Check the given [method] declaration against override-error codes.
     *
     * See [_checkForAllInvalidOverrideErrorCodes].
     */
    void _checkForAllInvalidOverrideErrorCodesForMethod(
        MethodDeclaration method) {
      if (_options.strongMode) {
        return; // strong mode already checked for this
      }
      if (_enclosingClass == null ||
          method.isStatic ||
          method.body is NativeFunctionBody) {
        return;
      }
      ExecutableElement executableElement = method.element;
      if (executableElement == null) {
        return;
      }
      SimpleIdentifier methodName = method.name;
      if (methodName.isSynthetic) {
        return;
      }
      FormalParameterList formalParameterList = method.parameters;
      NodeList<FormalParameter> parameterList = formalParameterList?.parameters;
      List<AstNode> parameters =
          parameterList != null ? new List.from(parameterList) : null;
      _checkForAllInvalidOverrideErrorCodesForExecutable(executableElement,
          executableElement.parameters, parameters, methodName);
    }
  
    /**
  
negative.code:       }
      }
      try {
        return super.visitFieldDeclaration(node);
      } finally {
        _isInStaticVariableDeclaration = false;
  