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 {
450
450
// / Whether to print parameter specifiers as 'let' and 'var'.
451
451
bool PrintParameterSpecifiers = false ;
452
452
453
+ // / Whether to print inheritance lists for types.
454
+ bool PrintInherited = true ;
455
+
453
456
// / \see ShouldQualifyNestedDeclarations
454
457
enum class QualifyNestedDeclarations {
455
458
Never,
Original file line number Diff line number Diff line change @@ -2073,6 +2073,9 @@ void PrintAST::printDeclGenericRequirements(GenericContext *decl) {
2073
2073
}
2074
2074
2075
2075
void PrintAST::printInherited (const Decl *decl) {
2076
+ if (!Options.PrintInherited ) {
2077
+ return ;
2078
+ }
2076
2079
SmallVector<TypeLoc, 6 > TypesToPrint;
2077
2080
getInheritedForPrinting (decl, Options, TypesToPrint);
2078
2081
if (TypesToPrint.empty ())
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ PrintOptions SymbolGraph::getDeclarationFragmentsPrintOptions() const {
61
61
Opts.SkipPrivateStdlibDecls = true ;
62
62
Opts.SkipUnderscoredStdlibProtocols = true ;
63
63
Opts.PrintGenericRequirements = true ;
64
+ Opts.PrintInherited = false ;
64
65
65
66
Opts.ExclusiveAttrList .clear ();
66
67
Original file line number Diff line number Diff line change 6
6
// RUN: %FileCheck %s --input-file %t/NominalTypes.symbols.json --check-prefix=ENUM
7
7
// RUN: %FileCheck %s --input-file %t/NominalTypes.symbols.json --check-prefix=TYPEALIAS
8
8
9
- public struct S < T> where T: Sequence { }
9
+ public protocol P { }
10
+
11
+ public struct S < T> : P where T: Sequence { }
10
12
11
13
// STRUCT-LABEL: "precise": "s:12NominalTypes1SV",
12
14
// STRUCT: "declarationFragments": [
You can’t perform that action at this time.
0 commit comments