Skip to content

Commit 3777054

Browse files
committed
RequirementMachine: Fix dump() output for a recent change
Protocol machines now have the 'Self' generic parameter in 'Params', so we have to change the order of the two 'if' statements.
1 parent af99ac5 commit 3777054

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/AST/RequirementMachine/RequirementMachine.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -359,19 +359,18 @@ void RequirementMachine::dump(llvm::raw_ostream &out) const {
359359
out << "Requirement machine for ";
360360
if (Sig)
361361
out << Sig;
362-
else if (!Params.empty()) {
363-
out << "fresh signature <";
364-
for (auto paramTy : Params)
365-
out << " " << Type(paramTy);
366-
out << " >";
367-
} else {
362+
else if (!System.getProtocols().empty()) {
368363
auto protos = System.getProtocols();
369-
assert(!protos.empty());
370364
out << "protocols [";
371365
for (auto *proto : protos) {
372366
out << " " << proto->getName();
373367
}
374368
out << " ]";
369+
} else {
370+
out << "fresh signature <";
371+
for (auto paramTy : Params)
372+
out << " " << Type(paramTy);
373+
out << " >";
375374
}
376375
out << "\n";
377376

0 commit comments

Comments
 (0)