Skip to content

Consider supporting overload in type inference #684

Description

@eb8680

Many standard library functions (e.g. range) have polymorphic types that must be expressed in terms of multiple signatures given with typing.overload. If we want to be able to create and work with Operations that faithfully mirror these functions, we may need to support overload in our type inference machinery.

The official specification for overload describes how to type applications of overloaded functions, and the Callable specification describes how to unify overloaded functions with other function types. It might be possible to represent such types internally with Union and share the existing Union code paths, which would greatly simplify the implementation if doing so really is correct under the specification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions