Skip to content

Support TypeExpr types #463

@KotlinIsland

Description

@KotlinIsland
def f(t: TypeExpr[T]) -> T: ... reveal_type(f(int | str)) # int | str a: TypeExpr[int | str] a = int | str # valid UnionType a = int # valid int a = 1 # valid, bare literal a = object # invalid, object isn't a subtype of int | str

I can imagine a lot of cases where there is ambiguous stuff like t: TypeExpr[Any], so we can just ban those ones.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions