Skip to content

Commit b3bb5c2

Browse files
committed
add visit_overloaded to ConstraintBuilderVisitor
Part of #730
1 parent 8cbf4d2 commit b3bb5c2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mypy/constraints.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,12 @@ def infer_against_any(self, types: List[Type]) -> List[Constraint]:
273273
res.extend(infer_constraints(t, AnyType(), self.direction))
274274
return res
275275

276+
def visit_overloaded(self, type: Overloaded) -> List[Constraint]:
277+
res = [] # type: List[Constraint]
278+
for t in type.items():
279+
res.extend(infer_constraints(t, self.actual, self.direction))
280+
return res
281+
276282

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

0 commit comments

Comments
 (0)