Node value = init.getAssignedValue();
Preconditions.checkState(value != null);
// Check for function declarations before the value is moved in the AST.
boolean isFunctionDeclaration = NodeUtil.isFunctionDeclaration(value);
compiler.reportChangeToEnclosingScope(ref.getNode());
inlineValue(v, ref, value.detachFromParent());
if (decl != init) {
Node expressRoot = init.getGrandparent();
Preconditions.checkState(expressRoot.isExprResult());
NodeUtil.removeChild(expressRoot.getParent(), expressRoot);
}