We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3d9b87 commit 0973224Copy full SHA for 0973224
lib/Sema/TypeCheckConstraints.cpp
@@ -1406,7 +1406,13 @@ void ConstraintSystem::print(raw_ostream &out) const {
1406
}
1407
1408
out << "Type Variables:\n";
1409
- for (auto tv : getTypeVariables()) {
+ std::vector<TypeVariableType *> typeVariables(getTypeVariables().begin(),
1410
+ getTypeVariables().end());
1411
+ llvm::sort(typeVariables,
1412
+ [](const TypeVariableType *lhs, const TypeVariableType *rhs) {
1413
+ return lhs->getID() < rhs->getID();
1414
+ });
1415
+ for (auto tv : typeVariables) {
1416
out.indent(2);
1417
Type(tv).print(out, PO);
1418
if (tv->getImpl().canBindToLValue())
0 commit comments