We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e1de97e commit 70a1b5fCopy full SHA for 70a1b5f
lib/AST/ASTPrinter.cpp
@@ -900,7 +900,7 @@ void PrintAST::printAccessors(AbstractStorageDecl *ASD) {
900
bool inProtocol = isa<ProtocolDecl>(ASD->getDeclContext());
901
if (inProtocol ||
902
(Options.AbstractAccessors && !Options.FunctionDefinitions)) {
903
- bool mutatingGetter = ASD->isGetterMutating();
+ bool mutatingGetter = ASD->getGetter() && ASD->isGetterMutating();
904
bool settable = ASD->isSettable(nullptr);
905
bool nonmutatingSetter = false;
906
if (settable && ASD->isSetterNonMutating() && ASD->isInstanceMember() &&
0 commit comments