-
Notifications
You must be signed in to change notification settings - Fork 446
Parse init
accessors.
#1731
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
Parse init
accessors.
#1731
Conversation
@swift-ci please test |
@swift-ci please test |
@swift-ci please test |
@swift-ci please test Windows platform |
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.
I’ve got a couple of post-merge comments for additional test cases / diagnostics.
The parsing pieces look good to me. I’ve got some opinions of how the node types and children should be named but I’ll try to put together a document around naming guidelines for these and will address my thoughts on the names once that’s finished.
} | ||
} | ||
""" | ||
) |
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.
Could you add a test case for the following? We should be offering a Fix-It to switch the positions of initializes(x)
and accesses(y)
struct S {
var value: Int {
init accesses(y) initializes(x) {}
}
}
Also I think the following tests would be useful
struct S {
var value: Int {
get accesses(y) {}
}
}
struct S {
var value: Int {
init throws {}
}
}
This is the SwiftSyntax-side change to swiftlang/swift#66283. Add parsing for
init
accessors: