Skip to content

Commit f1892fc

Browse files
authored
Merge pull request #65053 from xedin/cs-adjust-type-variable-printing
[ConstraintSystem] NFC: Print attributes/capabilities only for unboun…
2 parents d563b58 + 53fdeb1 commit f1892fc

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

lib/Sema/CSBindings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1784,7 +1784,7 @@ void BindingSet::dump(llvm::raw_ostream &out, unsigned indent) const {
17841784
PO.PrintTypesForDebugging = true;
17851785

17861786
if (auto typeVar = getTypeVariable()) {
1787-
typeVar->print(out, PO);
1787+
typeVar->getImpl().print(out);
17881788
out << " ";
17891789
}
17901790

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,14 +1442,14 @@ void ConstraintSystem::print(raw_ostream &out) const {
14421442
auto rep = getRepresentative(tv);
14431443
if (rep == tv) {
14441444
if (auto fixed = getFixedType(tv)) {
1445-
tv->getImpl().print(out);
1445+
tv->print(out, PO);
14461446
out << " as ";
14471447
Type(fixed).print(out, PO);
14481448
} else {
14491449
const_cast<ConstraintSystem *>(this)->getBindingsFor(tv).dump(out, 1);
14501450
}
14511451
} else {
1452-
tv->getImpl().print(out);
1452+
tv->print(out, PO);
14531453
out << " equivalent to ";
14541454
Type(rep).print(out, PO);
14551455
}

test/Constraints/init_literal_via_coercion.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
// CHECK: ---Constraint solving at [{{.*}}:12:1 - line:12:13]---
88
// CHECK: (integer_literal_expr type='[[LITERAL_VAR:\$T[0-9]+]]' {{.*}}
99
// CHECK: Type Variables:
10-
// CHECK: [[LITERAL_VAR]] [allows bindings to: {{.*}}] as UInt32 {{.*}}
10+
// CHECK: [[LITERAL_VAR]] as UInt32 {{.*}}
1111
// CHECK-NOT: disjunction (remembered) \[\[locator@{{.*}} [Coerce@{{.*}}\]\]]:
1212
_ = UInt32(0)
1313

1414
// CHECK: ---Constraint solving at [{{.*}}22:1 - line:22:13]---
1515
// CHECK: (coerce_expr implicit type='[[CAST_TYPE:\$T[0-9]+]]' {{.*}}
1616
// CHECK-NEXT: (nil_literal_expr type='[[LITERAL_VAR:\$T[0-9]+]]' {{.*}}
1717
// CHECK: Type Variables:
18-
// CHECK: [[LITERAL_VAR]] [allows bindings to: {{.*}}] as Int? {{.*}}
18+
// CHECK: [[LITERAL_VAR]] as Int? {{.*}}
1919
// CHECK: disjunction (remembered) {{.*}}
2020
// CHECK-NEXT: > [favored] [[CAST_TYPE]] bind Int?
2121
// CHECK-NEXT: > [[CAST_TYPE]] bind Int

0 commit comments

Comments
 (0)