mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #19742 from AnthonyLatsis/class-var-override-compl
[CodeCompletion][Parser] Completions for overridable static members
This commit is contained in:
@@ -2411,7 +2411,7 @@ void PrintAST::visitVarDecl(VarDecl *decl) {
|
||||
printAttributes(decl);
|
||||
printAccess(decl);
|
||||
if (!Options.SkipIntroducerKeywords) {
|
||||
if (decl->isStatic())
|
||||
if (decl->isStatic() && Options.PrintStaticKeyword)
|
||||
printStaticKeyword(decl->getCorrectStaticSpelling());
|
||||
if (decl->getKind() == DeclKind::Var
|
||||
|| Options.PrintParameterSpecifiers) {
|
||||
@@ -2687,7 +2687,7 @@ void PrintAST::visitFuncDecl(FuncDecl *decl) {
|
||||
printSourceRange(Range, Ctx);
|
||||
} else {
|
||||
if (!Options.SkipIntroducerKeywords) {
|
||||
if (decl->isStatic())
|
||||
if (decl->isStatic() && Options.PrintStaticKeyword)
|
||||
printStaticKeyword(decl->getCorrectStaticSpelling());
|
||||
if (decl->isMutating() && !decl->getAttrs().hasAttribute<MutatingAttr>()) {
|
||||
Printer.printKeyword("mutating", Options, " ");
|
||||
|
||||
Reference in New Issue
Block a user