An unexpected type is revealed by this program:
fromtypingimportAnyclassA:
deff(self, o: Any) ->None:
isinstance(o, self.__class__) andreveal_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.
An unexpected type is revealed by this program:
The issue was introduced by #2997. The most precise type would be
A. Mypy used to inferAnyas the type before #2997.