-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ASTPrinter] Fix duplicate «mutating» modifiers when printing file interface #30011
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
[ASTPrinter] Fix duplicate «mutating» modifiers when printing file interface #30011
Conversation
@swift-ci Please smoke test |
@slavapestov @brentdax is this ready to go? I don't understand the PrintImplicitAttributes part of this change, but the rest seems good to me. |
@@ -1008,19 +1005,23 @@ void PrintAST::printAttributes(const Decl *D) { | |||
// clients, or if it inherits superclass convenience initializers, | |||
// then print those attributes specially. | |||
if (auto CD = dyn_cast<ClassDecl>(D)) { | |||
if (Options.PrintImplicitAttrs) { |
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.
@benlangmuir This is all nested inside if (Options.PrintImplicitAttrs)
up above, so I just eliminated the unnecessary scope.
@benlangmuir I am not sure when we will hear from Slava, but since the change is approved, do you mind merging it for me? This better be fixed for 5.2. |
Let's re-test since it's been so long. |
@swift-ci Please smoke test |
Thanks, Ben! |
Resolves SR-12139.
I am still unable to sort out the expected behavior of
PrintImplicitAttributes
though. In particular, the if statement inprintAttributes
is narrowing down the set of attributes to print in a strangely selective manner (although printing implicit attributes implies printing more attributes than otherwise).