Skip to content

Top[] and Bottom[] should respect upper bounds and constraints #1109

@InSyncWithFoo

Description

@InSyncWithFoo

Minimal reproducible example (playground):

class Covariant[T: int]:
    def _(self) -> T: ...

def _(covariant: Top[Covariant[Any]]):
    reveal_type(covariant)  # `Covariant[object]`, but should instead be `Covariant[int]`

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions