File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
test/SymbolGraph/Symbols/Mixins/DeclarationFragments/Full Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -450,6 +450,9 @@ struct PrintOptions {
450450 // / Whether to print parameter specifiers as 'let' and 'var'.
451451 bool PrintParameterSpecifiers = false ;
452452
453+ // / Whether to print inheritance lists for types.
454+ bool PrintInherited = true ;
455+
453456 // / \see ShouldQualifyNestedDeclarations
454457 enum class QualifyNestedDeclarations {
455458 Never,
Original file line number Diff line number Diff line change @@ -2073,6 +2073,9 @@ void PrintAST::printDeclGenericRequirements(GenericContext *decl) {
20732073}
20742074
20752075void PrintAST::printInherited (const Decl *decl) {
2076+ if (!Options.PrintInherited ) {
2077+ return ;
2078+ }
20762079 SmallVector<TypeLoc, 6 > TypesToPrint;
20772080 getInheritedForPrinting (decl, Options, TypesToPrint);
20782081 if (TypesToPrint.empty ())
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ PrintOptions SymbolGraph::getDeclarationFragmentsPrintOptions() const {
6161 Opts.SkipPrivateStdlibDecls = true ;
6262 Opts.SkipUnderscoredStdlibProtocols = true ;
6363 Opts.PrintGenericRequirements = true ;
64+ Opts.PrintInherited = false ;
6465
6566 Opts.ExclusiveAttrList .clear ();
6667
Original file line number Diff line number Diff line change 66// RUN: %FileCheck %s --input-file %t/NominalTypes.symbols.json --check-prefix=ENUM
77// RUN: %FileCheck %s --input-file %t/NominalTypes.symbols.json --check-prefix=TYPEALIAS
88
9- public struct S < T> where T: Sequence { }
9+ public protocol P { }
10+
11+ public struct S < T> : P where T: Sequence { }
1012
1113// STRUCT-LABEL: "precise": "s:12NominalTypes1SV",
1214// STRUCT: "declarationFragments": [
You can’t perform that action at this time.
0 commit comments