Commit 139071c
[mypyc] feat: support negative index in TupleGet op (#19990)
This PR modifies `TupleGet.__init__` to automatically convert negative
indexes to positive indexes instead of crashing at the assert
This won't change functionality on its own, since none of the existing
calling locations can pass a negative value, but will allow us to pass
negative values in #19972 so I think
we should consider this PR a prerequisite to that one
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Piotr Sawicki <[email protected]>1 parent d2a8800 commit 139071c
1 file changed
+9
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1045 | 1045 | | |
1046 | 1046 | | |
1047 | 1047 | | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1048 | 1052 | | |
1049 | 1053 | | |
1050 | | - | |
1051 | | - | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
1052 | 1059 | | |
1053 | 1060 | | |
1054 | 1061 | | |
| |||
0 commit comments