Skip to content

Subexpression type narrowing for match statements #4971

@erictraut

Description

@erictraut

Currently, pyright narrows only the subject expression of a match statement. However, there are cases where a subject expression contains a subexpression that could also be narrowed, at least in theory.

Likewise, expressions that utilize the subject as a subexpression could be narrowed, in theory.

I don't yet know if either of these can be implemented in a way that is computationally feasible, but it's worth investigating.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions