-
Notifications
You must be signed in to change notification settings - Fork 227
Closed
astral-sh/ruff
#18687Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementationhelp wantedContributions especially welcomeContributions especially welcometype propertiessubtyping, assignability, equivalence, and moresubtyping, assignability, equivalence, and more
Description
Summary
Currently, the Type::has_relation_to has hardcoded the fact that no fully static type other than Never is a subtype of Never but that's incorrect because a type variable T with upper bound Never should also be a subtype of Never.
Playground: https://play.ty.dev/9b734d22-6fdf-4f20-a357-eea12caa5336
from typing import Never
from ty_extensions import static_assert, is_subtype_of
def _[T: Never]():
# This is false, but should be true
static_assert(is_subtype_of(T, Never))Version
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggenericsBugs or features relating to ty's generics implementationBugs or features relating to ty's generics implementationhelp wantedContributions especially welcomeContributions especially welcometype propertiessubtyping, assignability, equivalence, and moresubtyping, assignability, equivalence, and more