-
Notifications
You must be signed in to change notification settings - Fork 396
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
Getting wrong type in conformingTo protocols in ExtensionMacro
#2049
Comments
|
Tracked in Apple’s issue tracker as rdar://113668922 |
|
Thanks for reporting the issue @soumyamahunt. @hborla is fixing it in swiftlang/swift#67889. |
|
Thanks @ahoppen and @hborla for the quick fix, let me know once fix is available in latest snapshots. This is a major blocker for MetaCodable migrating to extension macros. |
|
The August 12 main development snapshot should contain the fix. |
Thanks @ahoppen, with latest main snapshot this issue is fixed, MetaCodable is buildable now (although tests are failing due to #2031). Closing this issue. |
|
The fix hasn’t made it into Xcode 15.0, unfortunately. As this is fixed in the GitHub repo, the fix should be included in a future Xcode version. |
Description
When declaring an extension macro that provides extensions for multiple protocols, i.e.
Codablemacro providing extension forDecodableandEncodable, by default protocol names are joined together and provided as a single type in theprotocolsarray.For each protocol conformance is provided,
protocolsarray should have a separate type syntax item.Steps to Reproduce
Xcode: Version 15.0 beta 6 (15A5219j)
Swift syntax version: 509.0.0-swift-DEVELOPMENT-SNAPSHOT-2023-08-07-a
Create an extension macro implementation that should print the
protocolsarray in build log:And attach this macro to a type:
Inspect the
protocolsarray in build log:The text was updated successfully, but these errors were encountered: