Skip to content

[pyrefly] Deduplicate legacy type parameter quantification - #4395

Open
lyydsheep wants to merge 1 commit into
facebook:mainfrom
lyydsheep:codex/issue-4299-legacy-tparam-dedup
Open

[pyrefly] Deduplicate legacy type parameter quantification#4395
lyydsheep wants to merge 1 commit into
facebook:mainfrom
lyydsheep:codex/issue-4299-legacy-tparam-dedup

Conversation

@lyydsheep

Copy link
Copy Markdown

Fixes #4299

Share the existing quantified construction for TypeVar, TypeVarTuple, and ParamSpec across the two legacy type-alias conversion paths while keeping diagnostics, source anchors, defaults, and substitutions unchanged.

Validation:

  • cargo test -p pyrefly type_alias -- --nocapture (109 passed)
  • cargo test -p pyrefly generic_legacy -- --nocapture (66 passed)
  • cargo test -p pyrefly type_var_tuple -- --nocapture (39 passed)
  • python3 test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema

The local .scratch planning files are intentionally not part of this PR.

Share quantified parameter construction across legacy type-alias paths while preserving their existing diagnostics and substitutions.
@meta-cla meta-cla Bot added the cla signed label Aug 1, 2026
@github-actions github-actions Bot added the size/s label Aug 1, 2026
@meta-codesync

meta-codesync Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D114460844. (Because this pull request was imported automatically, there will not be any future comments.)

@lyydsheep
lyydsheep marked this pull request as ready for review August 2, 2026 04:14
@github-actions
github-actions Bot requested a review from maggiemoss August 2, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dedup part of tvars_to_tparams_for_type_alias_type and tvars_to_tparams_for_type_alias

2 participants