Function select_method

Source
pub fn select_method(
    expr: Loc<()>,
    self_type: &TypeVarID,
    method: &Loc<Identifier>,
    trait_impls: &TraitImplList,
    type_state: &TypeState,
) -> Result<Option<Loc<NameID>>, Diagnostic>
Expand description

Attempts to look up which function to call when calling method on a var of type self_type. Returns the method to call if it is fully known and exists, an error if there is no such method, or None if the method is ambiguous