basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

attribute types

Open KotlinIsland opened this issue 1 year ago • 0 comments

class A:
    a: Final[int]
    b: TypeCheckOnly[str]
class A2(A):
    a: Final[bool]

class B[T: A]:
    c: T.a

b: B[A2]
reveal_type(b.c)  # bool

KotlinIsland avatar Apr 19 '24 04:04 KotlinIsland