-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[sending] Look through the sending type repr when printing the type of a function result using the type repr fallback path. #76491
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
Merged
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
@swift-ci smoke test |
bc07058
to
7269c69
Compare
@swift-ci smoke test |
tshortli
reviewed
Sep 16, 2024
cf652e5
to
fb4f307
Compare
@swift-ci smoke test |
…f a function result using the type repr fallback path. When we print types in the AST printer if for some reason we cannot find the appropriate type to print or if the user explicitly asks, we fall back and use a type repr instead. This behavior causes a problem due to the implementation of sending results using a sending type repr to communicate that the relevant function has a sending result, but we actually do not use the sending type repr from that point on. So as a result, in this fallback case, we put in one too many sending on the result. rdar://135594964
fb4f307
to
15a34a5
Compare
@swift-ci smoke test |
tshortli
approved these changes
Sep 18, 2024
Failed to compile in LLVM |
@swift-ci smoke test macOS platform |
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.
[sending] Look through the sending typerepr when printing the type of a function result using the type repr fallback path.
When we print types in the AST printer if for some reason we cannot find the
appropriate type to print, we fall back and use a type repr instead. This
behavior is a fallback case that is hit rarely (or we would have seen this
behavior earlier).
This behavior causes a problem due to the implementation of sending results
using a sending type repr to communicate that the relevant Function has a
sending result, but we actually do not use the sending type repr from that point
on. So as a result, in this fallback case, we put in one too many sending on the
result.
Previously, it was pretty hard to test this codepath, so I added a small option
that is available only in asserts builds that turns on the type repr behavior
all the time.
rdar://135594964