basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

Intersection types

Open KotlinIsland opened this issue 4 years ago • 0 comments

Add support for Intersection types.

Intersection[A, B] == <subclass of "A" and "B">.

class A:
    def foo(self) -> A: ...

class B:
    def foo(self) -> B: ...

class C(A, B):
    def foo(self) -> A & B: ...

KotlinIsland avatar Oct 29 '21 07:10 KotlinIsland