mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
gh-93345: Fix a crash in substitution of nested TypeVar after TypeVarTuple (GH-93346)
For example: tuple[*Ts, list[T]][int, str, bool]
This commit is contained in:
parent
5893b5db98
commit
f545fc955a
3 changed files with 10 additions and 2 deletions
|
@ -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];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue