Skip to content

Commit b497d3a

Browse files
committed
Use cache for DictExpr as well
1 parent c53367f commit b497d3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/checkexpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6043,7 +6043,7 @@ def accept(
60436043
# We cannot use cache inside lambdas, because they skip immediate type
60446044
# context, and use enclosing one, see infer_lambda_type_using_context().
60456045
# TODO: consider using cache for more expression kinds.
6046-
elif isinstance(node, (CallExpr, ListExpr, TupleExpr, OpExpr)) and not (
6046+
elif isinstance(node, (CallExpr, ListExpr, TupleExpr, DictExpr, OpExpr)) and not (
60476047
self.in_lambda_expr or self.chk.current_node_deferred
60486048
):
60496049
if (node, type_context) in self.expr_cache:

0 commit comments

Comments
 (0)