Skip to content

Fix missing node in --quick mode also for type aliases #3356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions mypy/fixup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
MypyFile, SymbolNode, SymbolTable, SymbolTableNode,
TypeInfo, FuncDef, OverloadedFuncDef, Decorator, Var,
TypeVarExpr, ClassDef, Block,
LDEF, MDEF, GDEF
LDEF, MDEF, GDEF, TYPE_ALIAS
)
from mypy.types import (
CallableType, EllipsisType, Instance, Overloaded, TupleType, TypedDictType,
Expand Down Expand Up @@ -93,8 +93,8 @@ def visit_symbol_table(self, symtab: SymbolTable) -> None:
else:
# We have a missing crossref in quick mode, need to put something
value.node = stale_info()
if value.type_override is not None:
value.type_override.accept(self.type_fixer)
if value.kind == TYPE_ALIAS:
value.type_override = Instance(stale_info(), [])
else:
if isinstance(value.node, TypeInfo):
# TypeInfo has no accept(). TODO: Add it?
Expand Down