File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -1416,14 +1416,23 @@ void ConstraintSystem::print(raw_ostream &out) const {
14161416 for (auto tv : typeVariables) {
14171417 out.indent (2 );
14181418 Type (tv).print (out, PO);
1419+ SmallVector<TypeVariableOptions, 4 > bindingOptions;
14191420 if (tv->getImpl ().canBindToLValue ())
1420- out << " [lvalue allowed] " ;
1421+ bindingOptions. push_back (TypeVariableOptions::TVO_CanBindToLValue) ;
14211422 if (tv->getImpl ().canBindToInOut ())
1422- out << " [inout allowed] " ;
1423+ bindingOptions. push_back (TypeVariableOptions::TVO_CanBindToInOut) ;
14231424 if (tv->getImpl ().canBindToNoEscape ())
1424- out << " [noescape allowed] " ;
1425+ bindingOptions. push_back (TypeVariableOptions::TVO_CanBindToNoEscape) ;
14251426 if (tv->getImpl ().canBindToHole ())
1426- out << " [hole allowed]" ;
1427+ bindingOptions.push_back (TypeVariableOptions::TVO_CanBindToHole);
1428+ if (!bindingOptions.empty ()) {
1429+ out << " [allows bindings to: " ;
1430+ interleave (bindingOptions, out,
1431+ [&](TypeVariableOptions option) {
1432+ (out << tv->getImpl ().getTypeVariableOptions (option));},
1433+ " , " );
1434+ out << " ]" ;
1435+ }
14271436 auto rep = getRepresentative (tv);
14281437 if (rep == tv) {
14291438 if (auto fixed = getFixedType (tv)) {
You can’t perform that action at this time.
0 commit comments