Closed
Description
An unexpected type is revealed by this program:
from typing import Any
class A:
def f(self, o: Any) -> None:
isinstance(o, self.__class__) and reveal_type(o) # Revealed type is 'builtins.object'
The issue was introduced by #2997. The most precise type would be A
. Mypy used to infer Any
as the type before #2997.