Skip to content

[5.9 🍒][Compile Time Constant Extraction] Extract the instance type for type values - not the metatype #65465

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

artemcm
Copy link
Contributor

@artemcm artemcm commented Apr 27, 2023

Cherry-pick of #65464

• Release: Swift 5.9
• Explanation: The intended design is to extract actual types of type values appearing in conformance properties, whereas the original extraction code-path queried and recorded the type values' types - their metatypes.
• Scope of Issue: Compile-time extraction code produces meta type information instead of type information, encoding extraneous .Type type names and m-postfix mangled names
• Origination: Original implementation incorrectly queried the type value type instead of instance type.
• Automated Testing: Test suite tests updated to reflect the new, and desired, behavior.
• Risk: Minimal, small change to const-extraction code path to look through to the instance type of a .self expression when one is used to default-initialize a property on a conformance to the queried protocols.

Resolves rdar://108609420

… values - not the metatype

The intended design is to extract actual types of type values appearing in conformance properties, whereas the original extraction code-path queried and recorded the type values' types - their metatypes.

Resolves rdar://108609420
@artemcm artemcm requested a review from nkcsgexi April 27, 2023 15:16
@artemcm artemcm requested a review from a team as a code owner April 27, 2023 15:16
@artemcm
Copy link
Contributor Author

artemcm commented Apr 27, 2023

@swift-ci test

@artemcm artemcm requested a review from tshortli April 27, 2023 15:21
@artemcm artemcm merged commit 893d94d into swiftlang:release/5.9 Apr 28, 2023
@artemcm artemcm deleted the 59ConstExtractTypeValue-not-metatype branch April 28, 2023 16:15
@AnthonyLatsis AnthonyLatsis added the 🍒 release cherry pick Flag: Release branch cherry picks label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants