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 042f726 commit fe2f670Copy full SHA for fe2f670
mypyc/test-data/irbuild-constant-fold.test
@@ -484,10 +484,22 @@ from typing import Final
484
485
long_string: Final = "long string"
486
487
-def f() -> None:
+def pos_index() -> None:
488
+ a = long_string[5]
489
+def neg_index() -> None:
490
+ a = long_string[-5]
491
+def slice_index() -> None:
492
a = long_string[5:]
493
[out]
-def f():
494
+def pos_index():
495
+ a :: str
496
+L0:
497
+ a = "s"
498
+def neg_index():
499
500
501
+ a = "t"
502
+def slice_index():
503
a :: str
504
L0:
505
a = "string"
0 commit comments