mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +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]
(cherry picked from commit f545fc955a)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
00f8fe9564
commit
3265ff9ccc
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