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 ade311d commit 749ff4fCopy full SHA for 749ff4f
mypyc/irbuild/specialize.py
@@ -785,8 +785,8 @@ def get_literal_str(expr: Expression) -> str | None:
785
for i in range(len(exprs) - 1):
786
while (
787
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
+ and (first := get_literal_str(exprs[i])) is not None
+ and (second := get_literal_str(exprs[i + 1])) is not None
790
):
791
exprs = [*exprs[:i], StrExpr(first + second), *exprs[i + 2 :]]
792
format_ops = [*format_ops[:i], FormatOp.STR, *format_ops[i + 2 :]]
0 commit comments