Processing order of methods affects inferred attribute types #7162
Labels
bug
mypy got something wrong
priority-1-normal
semantic-analyzer
Problems that happen during semantic analysis
topic-import-cycles
This test case produces unexpected output when using the new semantic analyzer (after having reversed the processing order of modules within SCCs):
I'd expect the type of
x
to be consistentlyint
.This test case produces unexpected output with both semantic analyzers:
The reason for the weird behavior seems to be that we create duplicate
Var
nodes for attributes if the methods of a subclass are processed before base class methods.The text was updated successfully, but these errors were encountered: