docs: private static boolean implementingObsoleteMethod(
        MethodTree enclosingMethod, VisitorState state, Type type) {
      MethodSymbol method = ASTHelpers.getSymbol(enclosingMethod);
      if (method == null) {
        return false;
      }
      if (ASTHelpers.findSuperMethods(method, state.getTypes()).isEmpty()) {
        // not an override
        return false;
      }
      if (!ASTHelpers.isSameType(method.getReturnType(), type, state)) {
        return false;
      }
      return true;
    }