Fix nested TypeForm alias evaluation - #11634
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
🔒 Automated review in progress — Heejae Chang (@heejaechang) is auto-reviewing this PR. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
|
A runtime-first evaluation can still reuse the ordinary cache for nested TypeForm arguments, restoring the invalid TypeAliasType diagnostic. This needs a context-specific cache lookup and regression coverage. |
|
Fixed in f274ace — TypeForm argument evaluation now consults only the context-specific TypeForm cache and reevaluates when that entry is missing, so an ordinary runtime-cache hit cannot short-circuit contextual validation. Runtime-first regression coverage includes nested class aliases, generic aliases, ParamSpec, and TypeVarTuple cases. |
Heejae Chang (heejaechang)
left a comment
There was a problem hiding this comment.
Approved via Review Center.
Summary
Fixes #11633
Testing
npx jest typeEvaluator8.test --forceExit -t "TypeForm"npm run build(packages/pyright-internal)