-
Notifications
You must be signed in to change notification settings - Fork 10.5k
A bunch of fixes for variadic tuple properties in structs #64529
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 Please test |
@swift-ci Please smoke test macOS |
1 similar comment
@swift-ci Please smoke test macOS |
whichever case it happens to be in. This is a basic fix so that parallel walks on tuples and function types in the substituted type will work . Separately, though, I do not think the places that use this really need to be passed an orig type; this is used for computing type properties, and I am not aware of any reason we should need an orig type to compute type properties. Additionally, the orig types computed by this function are not really correct because of the substitution being done in some cases, so it'd be very nice to rip this all out. I'm not good to look into that right now, though.
needs to be lowered, use an opaque abstraction pattern. As I argue in the comment, we know that the orig type is now either an opaque type or a type with high-level structure that is invariant to lowering. Substitution will not change the latter property, and an opaque abstraction pattern is correct for the former. Attempting to create a "truer" abstraction pattern that preserves more structure from the orig type is both pointless and problematic. The substitutions we just did may have replaced pack references with non-pack types if there are active expansions in progress; this cannot be easily explained in terms of substitutions. (In theory, we could pass a more opaque concept of substitutions through AbstractionPattern, which might help with this. That would also make it harder to catch bugs with signature mismatches, though.)
properties for struct and enum types.
argument emission.
My original test case here used a memberwise initializer, but those use their own logic for binding and forward parameters which will need to be updated separately.
46e5519
to
c032cc5
Compare
@swift-ci Please test |
@swift-ci Please smoke test macOS |
@swift-ci Please smoke test |
@swift-ci Please test |
I think I spent an entire day not being able to land this PR despite it never breaking anything itself. |
@swift-ci Please smoke test |
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.
Builds on #64517.