Skip to content

fix type parameter missing a * #3067#3114

Open
asukaminato0721 wants to merge 1 commit intofacebook:mainfrom
asukaminato0721:3067
Open

fix type parameter missing a * #3067#3114
asukaminato0721 wants to merge 1 commit intofacebook:mainfrom
asukaminato0721:3067

Conversation

@asukaminato0721
Copy link
Copy Markdown
Contributor

Summary

Fixes #3067

the type display path was dropping the unpack marker for direct TypeVarTuple arguments, so Shape rendered bare where *Shape was required.

fmt_targ now preserves * for direct TypeVarTuple arguments while still avoiding **... for already-unpacked inputs.

Test Plan

add test

@meta-cla meta-cla bot added the cla signed label Apr 12, 2026
@asukaminato0721 asukaminato0721 marked this pull request as ready for review April 12, 2026 16:44
Copilot AI review requested due to automatic review settings April 12, 2026 16:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes incorrect type argument display for TypeVarTuple parameters in pyrefly_types so that direct TypeVarTuple arguments render with the required unpack marker (*Shape) while avoiding double-unpacking for already-unpacked inputs (**...).

Changes:

  • Update TypeDisplayContext::fmt_targ to handle TypeVarTuple parameters across tuple, unpack, and direct-TypeVarTuple argument cases.
  • Add a unit test asserting TupleParam[*Shape] rendering for a direct TypeVarTuple argument.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

type parameter missing a *

2 participants