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 aa227ff commit 15a8615Copy full SHA for 15a8615
mypyc/test-data/irbuild-bytes.test
@@ -217,3 +217,26 @@ L2:
217
L3:
218
keep_alive y
219
return r2
220
+
221
+ return r2 return r2
222
223
+[case testBytesJoinConstantFold]
224
+from typing import Final
225
226
+constant: Final = b"constant"
227
228
+def fold_tuple() -> str:
229
+ return b" ".join((constant, b"folded"))
230
+def fold_list() -> str:
231
+ return b" ".join([constant, b"folded"])
232
+[out]
233
+def fold_tuple():
234
+ r0 :: bytes
235
+L0:
236
+ r0 = "constant folded"
237
+ return r0
238
+def fold_list():
239
240
241
242
0 commit comments