code: void setResult(JCExpression tree, Type type) {
          result = type;
          if (env.info.isSpeculative) {
              //if we are in a speculative branch we can save the type in the tree itself
              //as there's no risk of polluting the original tree.
              tree.type = result;
          }
      }
docs: Set the results of method attribution.