You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
This diff doesn't actually do anything, but it pushes the
decision about whether to operate on a `Binding` vs an `ExprOrBinding`
a bit closer to the caller (without changing any of the public APIs)
This will eventually be portant for determinism: I eventually need
`bind_targets_with_value` to pass a callback rather than a raw value, because
that's the only way that I'll be able to make the `ensure_expr` actually track
usage for first-usage-based type inference
There's a sort of silly thing going on here where we wrap the result of
`make_binding` in a `BindingOrExpr` and then unwrap it again, which is needed
because the mutual recursion for unpacked targets combined with our best-effort
attempt at contextual typing for attr and subscript assignments requires us to
design `bind_target_impl` around the general case. This is a little messy
but not a real problem, the wrapping and unwrapping is very cheap.
Reviewed By: yangdanny97
Differential Revision: D75422385
fbshipit-source-id: b1a485a966d37c4d89ee37190dc5c6c42d3da2ca
0 commit comments