@@ -88,15 +88,15 @@ def constant_fold_expr(builder: IRBuilder, expr: Expression) -> ConstantValue |
8888 # TODO extend this to work with rtuples comprised of known literal values
8989 and isinstance (arg := args [0 ], (ListExpr , TupleExpr ))
9090 ):
91- folded_items = []
91+ folded_strings = []
9292 for item in arg .items :
9393 val = constant_fold_expr (builder , item )
9494 if not isinstance (val , str ):
9595 return None
96- folded_items .append (val )
97- return folded_callee .join (folded_items )
96+ folded_strings .append (val )
97+ return folded_callee .join (folded_strings )
9898
99- # builtins.str methods
99+ # builtins.bytes methods
100100 elif isinstance (folded_callee , bytes ):
101101 # str.join
102102 if (
@@ -105,13 +105,13 @@ def constant_fold_expr(builder: IRBuilder, expr: Expression) -> ConstantValue |
105105 # TODO extend this to work with rtuples comprised of known literal values
106106 and isinstance (arg := args [0 ], (ListExpr , TupleExpr ))
107107 ):
108- folded_items = []
108+ folded_bytes = []
109109 for item in arg .items :
110110 val = constant_fold_expr (builder , item )
111111 if not isinstance (val , bytes ):
112112 return None
113- folded_items .append (val )
114- return folded_callee .join (folded_items )
113+ folded_bytes .append (val )
114+ return folded_callee .join (folded_bytes )
115115 return None
116116
117117
0 commit comments