-
Notifications
You must be signed in to change notification settings - Fork 211
populate display name when untyping a type alias #1641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
@yangdanny97 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87558543. |
8c84120 to
e751a7a
Compare
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 21, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Differential Revision: D87558543
e751a7a to
c4bc420
Compare
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 21, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Differential Revision: D87558543
c4bc420 to
ae56df6
Compare
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 21, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Differential Revision: D87558543
ae56df6 to
944e041
Compare
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 24, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Differential Revision: D87558543
rchen152
approved these changes
Nov 24, 2025
Contributor
rchen152
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review automatically exported from Phabricator review in Meta.
944e041 to
aeb8e3d
Compare
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 24, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Reviewed By: rchen152 Differential Revision: D87558543
aeb8e3d to
e4bf4c4
Compare
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 25, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Reviewed By: rchen152 Differential Revision: D87558543
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 25, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Reviewed By: rchen152 Differential Revision: D87558543
6be69cb to
b177923
Compare
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 25, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Reviewed By: rchen152 Differential Revision: D87558543
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 25, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Reviewed By: rchen152 Differential Revision: D87558543
b177923 to
ce699cc
Compare
Summary: This is an alternative to D84849556, which aims to solve facebook#1219 Instead of introducing a new type variant, this diff introduces a new field in Type::Union to hold an optional display name. It will be populated when resolving a type alias. Compared to the other approach: benefits - less plumbing - type checking behavior unaffected drawbacks - only applies to type aliases of unions (though arguably this is where readability matters most) - name information is not preserved during union flattening (so if we union a type alias with something else, the result is the full expanded type) Differential Revision: D87558541 Reviewed By: rchen152
yangdanny97
added a commit
to yangdanny97/pyrefly
that referenced
this pull request
Nov 25, 2025
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Reviewed By: rchen152 Differential Revision: D87558543
ce699cc to
9b299c1
Compare
Summary: Pull Request resolved: facebook#1641 - populate display name when untyping a union - keep name when simplifying - display the expanded type when the top level type being printed is the alias (only use the display name for nested types) Reviewed By: rchen152 Differential Revision: D87558543
9b299c1 to
6d7cad5
Compare
|
This pull request has been merged in ffc61b7. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Differential Revision: D87558543