Skip to content

Commit 749ff4f

Browse files
Update specialize.py
1 parent ade311d commit 749ff4f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypyc/irbuild/specialize.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,8 +785,8 @@ def get_literal_str(expr: Expression) -> str | None:
785785
for i in range(len(exprs) - 1):
786786
while (
787787
len(exprs) >= i + 2
788-
and (first := constant_fold_expr(builder, exprs[i])) is not None
789-
and (second := constant_fold_expr(builder, exprs[i + 1])) is not None
788+
and (first := get_literal_str(exprs[i])) is not None
789+
and (second := get_literal_str(exprs[i + 1])) is not None
790790
):
791791
exprs = [*exprs[:i], StrExpr(first + second), *exprs[i + 2 :]]
792792
format_ops = [*format_ops[:i], FormatOp.STR, *format_ops[i + 2 :]]

0 commit comments

Comments
 (0)