Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always re-process annotations refering to an alias on update (#13759)
This should fix a crash discovered by `mypy_primer` in #13516 The logic here is that when type aliases have placeholders they are updated _in place_ (the node gets a new resolved target type). But this means that some variables annotated with type aliases may not get stored types, unless we defer targets where they are defined. This didn't cause troubles before, because we waited for type alias to be complete before putting it into symbol table. Now it is not possible, we need to put something into symbol table for partially complete aliases to support recursive aliases (similar to recursive classes). Also, it was tricky to come up with a repro for this issue, because when it happens, the variable gets a "silent" `Any` type, and only when it appears in a dataclass, it causes a crash.
- Loading branch information