Open
Description
The following program is type safe:
from typing import overload
class A: ...
class B: ...
class Parent:
def dst(self, x: A | B) -> int | None: ...
class Child(Parent):
@overload
def dst(self, x: A) -> int: ...
@overload
def dst(self, x: B) -> None: ...
This came up in python/typeshed#9862