Skip to content

Commit

Permalink
add visit_overloaded() to ConstraintBuilderVisitor
Browse files Browse the repository at this point in the history
Part of python#730
  • Loading branch information
JamesGuthrie committed Aug 24, 2015
1 parent 731f6dc commit 749bb56
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mypy/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,12 @@ def infer_against_any(self, types: List[Type]) -> List[Constraint]:
res.extend(infer_constraints(t, AnyType(), self.direction))
return res

def visit_overloaded(self, type: Overloaded) -> List[Constraint]:
res = [] # type: List[Constraint]
for t in type.items():
res.extend(infer_constraints(t, self.actual, self.direction))
return res


def negate_constraints(constraints: List[Constraint]) -> List[Constraint]:
res = [] # type: List[Constraint]
Expand Down

0 comments on commit 749bb56

Please sign in to comment.