-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Observation] Forward availability and defines to extensions #67412
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
[Observation] Forward availability and defines to extensions #67412
Conversation
} | ||
|
||
extension DeclGroupSyntax { | ||
var availability: AttributeListSyntax? { |
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.
@DougGregor this seems really complex to forward things - should this be included in SwiftSyntax/macros directly?
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.
Perhaps. We'd need to clarify what exactly should be automatically transferred to the extensions and implement that in SwiftSyntax.
@swift-ci please test |
b42a3aa
to
cc1b386
Compare
@swift-ci please test |
@swift-ci please test |
Windows failure seems unrelated. |
@swift-ci please test windows |
} | ||
|
||
extension DeclGroupSyntax { | ||
var availability: AttributeListSyntax? { |
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.
Perhaps. We'd need to clarify what exactly should be automatically transferred to the extensions and implement that in SwiftSyntax.
…ng#67412) * [Observation] Forward availability and defines to extensions * Simplify availability slightly from review feedback * Simplify availability for extensions to use `.with`
* [Observation] Forward availability and defines to extensions (#67412) * [Observation] Forward availability and defines to extensions * Simplify availability slightly from review feedback * Simplify availability for extensions to use `.with` * Use older name for detaching nodes * Force a newline for the trailing trivia of the replicated availability
Using availability markers and
#if
guards for observable types incorrectly emit extensions that are inherently incompatible with extensions.This forwards the relevant availability to the extensions.
Resolves:
rdar://112413879