Skip to content

Commit 15a8615

Browse files
Update irbuild-bytes.test
1 parent aa227ff commit 15a8615

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

mypyc/test-data/irbuild-bytes.test

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,26 @@ L2:
217217
L3:
218218
keep_alive y
219219
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+
r0 :: bytes
240+
L0:
241+
r0 = "constant folded"
242+
return r0

0 commit comments

Comments
 (0)