-
Notifications
You must be signed in to change notification settings - Fork 100
Open
Labels
type propertiessubtyping, assignability, equivalence, and moresubtyping, assignability, equivalence, and more
Milestone
Description
An example that I got from this post. As mentioned there, it's probably hard to support this in full generality, but it seems like those base cases should maybe be handled:
from ty_extensions import static_assert, is_equivalent_to, is_assignable_to, is_subtype_of
static_assert(is_equivalent_to(tuple[int | str], tuple[int] | tuple[str])) # currently fails
static_assert(is_assignable_to(tuple[int | str], tuple[int] | tuple[str])) # currently fails
static_assert(is_subtype_of(tuple[int | str], tuple[int] | tuple[str])) # currently fails
Metadata
Metadata
Assignees
Labels
type propertiessubtyping, assignability, equivalence, and moresubtyping, assignability, equivalence, and more