Skip to content

Commit 443c0a0

Browse files
Update irbuild-constant-fold.test
1 parent c10cbb0 commit 443c0a0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

mypyc/test-data/irbuild-constant-fold.test

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,3 +478,16 @@ L0:
478478
r3 = (-1.5+2j)
479479
neg_2 = r3
480480
return 1
481+
482+
[case testConditionalConstantFolding]
483+
from typing import Final
484+
485+
constant: Final = 1
486+
487+
def f() -> None:
488+
a = "t" if constant else "f"
489+
[out]
490+
def f():
491+
a :: str
492+
L0:
493+
a = "t"

0 commit comments

Comments
 (0)