Skip to content

Commit 55edc30

Browse files
committed
NFC: expose an InverseRequirement::print
1 parent bb51be7 commit 55edc30

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

include/swift/AST/Requirement.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,8 @@ struct InverseRequirement {
270270
static void expandDefaults(ASTContext &ctx,
271271
ArrayRef<Type> gps,
272272
SmallVectorImpl<StructuralRequirement> &result);
273+
274+
void print(raw_ostream &os, const PrintOptions &opts, bool forInherited=false) const;
273275
};
274276

275277
} // end namespace swift

lib/AST/ASTPrinter.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7424,6 +7424,13 @@ void Requirement::print(ASTPrinter &printer, const PrintOptions &opts) const {
74247424
PrintAST(printer, opts).printRequirement(*this);
74257425
}
74267426

7427+
void InverseRequirement::print(raw_ostream &os,
7428+
const PrintOptions &opts,
7429+
bool forInherited) const {
7430+
StreamPrinter printer(os);
7431+
PrintAST(printer, opts).printRequirement(*this, forInherited);
7432+
}
7433+
74277434
std::string GenericSignatureImpl::getAsString() const {
74287435
return GenericSignature(const_cast<GenericSignatureImpl *>(this))
74297436
.getAsString();

0 commit comments

Comments
 (0)