| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| if is_str_rprimitive(node_type) or isinstance(x, StrExpr): | ||
| # NOTE: why does mypyc think our fake StrExprs are not str rprimitives? | ||
| var_str = builder.accept(x) | ||
| elif (folded := constant_fold_expr(builder, x)) is not None: |
There was a problem hiding this comment.
foldable non-string values can be easily converted to str
Sorry, something went wrong.
| var_str = builder.primitive_op(str_op, [builder.accept(x)], line) | ||
| elif format_op == FormatOp.INT: | ||
| if is_int_rprimitive(node_type) or is_short_int_rprimitive(node_type): | ||
| if isinstance(folded := constant_fold_expr(builder, x), int): |
There was a problem hiding this comment.
if the expr can fold as an int we can convert it to str at build time
Sorry, something went wrong.
|
These tests should start working once #19982 is merged |
Sorry, something went wrong.
This reverts commit 7345e20.
| Back | FazBrowse Home | New Git URL |
No description provided.