Skip to content

Commit d86fc75

Browse files
JamesGuthrieJukkaL
authored andcommitted
Add visit_overloaded() to TypeTranslator.
Part of #730.
1 parent 93f096d commit d86fc75

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mypy/types.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,6 +631,10 @@ def translate_variables(self,
631631
variables: List[TypeVarDef]) -> List[TypeVarDef]:
632632
return variables
633633

634+
def visit_overloaded(self, type: Overloaded) -> Type:
635+
items = [t.accept(self) for t in type.items()] # type: ignore
636+
return Overloaded(items=cast(List[CallableType], items))
637+
634638

635639
class TypeStrVisitor(TypeVisitor[str]):
636640
"""Visitor for pretty-printing types into strings.

0 commit comments

Comments
 (0)