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 {
1416
1416
for (auto tv : typeVariables) {
1417
1417
out.indent (2 );
1418
1418
Type (tv).print (out, PO);
1419
+ SmallVector<TypeVariableOptions, 4 > bindingOptions;
1419
1420
if (tv->getImpl ().canBindToLValue ())
1420
- out << " [lvalue allowed] " ;
1421
+ bindingOptions. push_back (TypeVariableOptions::TVO_CanBindToLValue) ;
1421
1422
if (tv->getImpl ().canBindToInOut ())
1422
- out << " [inout allowed] " ;
1423
+ bindingOptions. push_back (TypeVariableOptions::TVO_CanBindToInOut) ;
1423
1424
if (tv->getImpl ().canBindToNoEscape ())
1424
- out << " [noescape allowed] " ;
1425
+ bindingOptions. push_back (TypeVariableOptions::TVO_CanBindToNoEscape) ;
1425
1426
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
+ }
1427
1436
auto rep = getRepresentative (tv);
1428
1437
if (rep == tv) {
1429
1438
if (auto fixed = getFixedType (tv)) {
You can’t perform that action at this time.
0 commit comments