Skip to main content

store_field_member_candidates

Function store_field_member_candidates 

Source
pub fn store_field_member_candidates(
    rewritten: &str,
    recv_offset: usize,
    locals: &[LocalBinding],
) -> Vec<Completion>
Expand description

#596: the entry ops (and, for a Map, the .entries/.keys/.values query accessors) of a bare store field receiver — merged onto value_member_candidates so a store field offers its whole vocabulary, not just the Query half kernel_methods::methods_for covers. A bare store Map field types (via the checker’s ADR 0120 “whole map as a value” reading) to plain Ty::Query, indistinguishable from an ordinary Query-typed local — so this reads the receiver’s provenance instead, the same way hover’s describe_store_op_at does. Empty when the receiver isn’t a store field of an enclosing agent, or is shadowed by a local.

rewritten/recv_offset are value_receiver_rewrite’s output; locals is the current round’s locals for the file, best-effort (empty when the analysed round doesn’t match rewritten, in which case the shadowing check simply sees no local in scope).