You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 55ee0bd
Browse filesBrowse the repository at this point in the historyBrowse files
Fix type variable defaults depending on previous variables (#21526)
Fixes#19192Fixes#20027
Fixes few TODOs in tests (don't know if there are relevant issues)
Closes#19382
Core idea is simple: don't do bizarre things :-) More precisely, instead
of various in-place modifications (which is a big no-no for types),
simply expand defaults iteratively as we build the environment for the
type. Couple additional things:
* Update defaults in `freshen_function_type_vars()` this is required for
consistency when updating `TypeVarId`s.
* Use `fix_instance()` in `checkexpr.py` for type applications. This
will apply _all_ type arguments in cases like `x = Foo[int](...)`. The
PEP and the spec say this is how it should be.
0 commit comments