Interface OverloadedFunctionDetails<Specifics>

Collects information about all functions with the same name. This is required to handle overloaded functions.

interface OverloadedFunctionDetails<Specifics extends TypirSpecifics> {
    details: RuleRegistry<
        SingleFunctionDetails<Specifics, Specifics["LanguageType"]>,
        Specifics,
    >;
    inferenceRule: CompositeTypeInferenceRule<Specifics>;
    overloadedFunctions: FunctionType[];
    sameOutputType: undefined | Type;
}

Type Parameters

Properties

details: RuleRegistry<
    SingleFunctionDetails<Specifics, Specifics["LanguageType"]>,
    Specifics,
>

Collects the details of all functions with the same name, grouped by language keys of their inference rules for function calls.

Collects the inference rules for all functions with the same name

overloadedFunctions: FunctionType[]

All function overloads/signatures with the same name.

sameOutputType: undefined | Type

If all overloaded functions with the same name have the same output/return type, this type is remembered here (for a small performance optimization).