Skip to content

Commit 4940cfc

Browse files
validate arg kind
1 parent d38d4b4 commit 4940cfc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypyc/irbuild/for_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1201,7 +1201,7 @@ def get_expr_length(expr: Expression) -> int | None:
12011201
and expr.node.has_explicit_value
12021202
):
12031203
return len(expr.node.final_value)
1204-
elif isinstance(expr, CallExpr) and isinstance(callee := expr.callee, NameExpr):
1204+
elif isinstance(expr, CallExpr) and isinstance(callee := expr.callee, NameExpr) and all(kind == ARG_POS for kind in expr.arg_kinds):
12051205
fullname = callee.fullname
12061206
if (
12071207
fullname in ("builtins.list", "builtins.tuple", "builtins.enumerate")

0 commit comments

Comments
 (0)