Skip to main content

sync_embedded_worker_exprs_from_calls

Function sync_embedded_worker_exprs_from_calls 

Source
pub fn sync_embedded_worker_exprs_from_calls(
    root: ExprId,
    arena: &ExprArena,
    types: &mut TypeTable,
)
Expand description

Copies the worker-name expression from the arena-backed CallTypeNode into InstanceType::worker_name for every Call whose type is TypeInternal::Instance.

InstanceType stores Option<Box<Expr>> for worker names; during inference those can diverge from the canonical subtree referenced by ExprId in the call node (for example after super::stateful_instance::ensure_stateful_instance). This pass aligns TypeTable with what rebuild_expr will produce.