mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sourcekit/DocSupport: include fully annotated generic signatures for extension decls. rdar://40906297
This commit is contained in:
@@ -397,6 +397,14 @@ static bool initDocEntityInfo(const Decl *D,
|
||||
VD, SynthesizedTarget, OS);
|
||||
else
|
||||
SwiftLangSupport::printFullyAnnotatedDeclaration(VD, Type(), OS);
|
||||
} else if (auto *E = dyn_cast<ExtensionDecl>(D)) {
|
||||
if (auto *Sig = E->getGenericSignature()) {
|
||||
// The extension under printing is potentially part of a synthesized
|
||||
// extension. Thus it's hard to print the fully annotated decl. We
|
||||
// need to at least print the generic signature here.
|
||||
llvm::raw_svector_ostream OS(Info.FullyAnnotatedGenericSig);
|
||||
SwiftLangSupport::printFullyAnnotatedGenericReq(Sig, OS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user