Skip to content

Commit 606930b

Browse files
Update irbuild-str.test
1 parent 6420e5a commit 606930b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

mypyc/test-data/irbuild-str.test

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,3 +740,20 @@ L2:
740740
L3:
741741
keep_alive x
742742
return r2
743+
744+
[case testStrJoinConstantFold]
745+
from typing import Final
746+
747+
constant: Final = "constant"
748+
749+
def fold_tuple() -> str:
750+
return " ".join((constant, "folded"))
751+
def fold_list() -> str:
752+
return " ".join([constant, "folded"])
753+
[out]
754+
def fold_tuple():
755+
L0:
756+
return "constant folded"
757+
def fold_list():
758+
L0:
759+
return "constant folded"

0 commit comments

Comments
 (0)