code: Type checkSpeculative(JCExpression expr, ResultInfo resultInfo) {
          return checkSpeculative(expr, expr.type, resultInfo);
      }
docs: Checks a type in the speculative tree against a given result; the type can be either a plain
  type or an argument type,in which case a more complex check is required.