Skip to content

Commit fe2f670

Browse files
Update irbuild-constant-fold.test
1 parent 042f726 commit fe2f670

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,10 +484,22 @@ from typing import Final
484484

485485
long_string: Final = "long string"
486486

487-
def f() -> None:
487+
def pos_index() -> None:
488+
a = long_string[5]
489+
def neg_index() -> None:
490+
a = long_string[-5]
491+
def slice_index() -> None:
488492
a = long_string[5:]
489493
[out]
490-
def f():
494+
def pos_index():
495+
a :: str
496+
L0:
497+
a = "s"
498+
def neg_index():
499+
a :: str
500+
L0:
501+
a = "t"
502+
def slice_index():
491503
a :: str
492504
L0:
493505
a = "string"

0 commit comments

Comments
 (0)