diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2022-05-31 05:46:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-31 05:46:16 (GMT) |
commit | f545fc955aeb701ae4e73b07ff2283f823d857b8 (patch) | |
tree | 5faff1c7a7f2bc34aedf6b6a352f5cd3cdbf7ea7 /Objects/genericaliasobject.c | |
parent | 5893b5db98b38b17750c0572c7209774a5034898 (diff) | |
download | cpython-f545fc955aeb701ae4e73b07ff2283f823d857b8.zip cpython-f545fc955aeb701ae4e73b07ff2283f823d857b8.tar.gz cpython-f545fc955aeb701ae4e73b07ff2283f823d857b8.tar.bz2 |
gh-93345: Fix a crash in substitution of nested TypeVar after TypeVarTuple (GH-93346)
For example: tuple[*Ts, list[T]][int, str, bool]
Diffstat (limited to 'Objects/genericaliasobject.c')
-rw-r--r-- | Objects/genericaliasobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/genericaliasobject.c b/Objects/genericaliasobject.c index 39fd709..5942081 100644 --- a/Objects/genericaliasobject.c +++ b/Objects/genericaliasobject.c @@ -296,7 +296,7 @@ subs_tvars(PyObject *obj, PyObject *params, else { if (iparam >= 0) { if (iparam > varparam) { - iparam += nargs - nsubargs; + iparam += nargs - nparams; } arg = argitems[iparam]; } |