We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8904125 commit 1cbfab9Copy full SHA for 1cbfab9
mypy/checkexpr.py
@@ -4377,6 +4377,9 @@ def check_list_multiply(self, e: OpExpr) -> Type:
4377
return result
4378
4379
def visit_assignment_expr(self, e: AssignmentExpr) -> Type:
4380
+ if self.overload_stack_depth > 0:
4381
+ # Poison cache when we encounter assignments in overloads - they affect the binder.
4382
+ self._args_cache[POISON_KEY] = []
4383
value = self.accept(e.value)
4384
self.chk.check_assignment(e.target, e.value)
4385
self.chk.check_final(e)
0 commit comments