Skip to main content

resolve_inheritdoc

Function resolve_inheritdoc 

Source
pub fn resolve_inheritdoc(
    gcx: Gcx<'_>,
    contract_id: ContractId,
    fn_name: &str,
    base_name: &str,
    param_types: Option<&[String]>,
) -> Option<InheritedDoc>
Expand description

Resolve @inheritdoc BaseContract for a function named fn_name inside contract_id (the current contract). Walks the linearized bases to find a matching function and returns its natspec if found.

When param_types is Some, the resolver prefers a function whose parameter type signature matches exactly; this disambiguates overloads. If no exact signature match is found, it falls back to the first name match.