Skip to content

Commit e8b840c

Browse files
authored
Merge pull request #60927 from amritpan/update-score-labels
[ConstraintSystem] Update score labels
2 parents 7f08d40 + 063de49 commit e8b840c

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

include/swift/Sema/ConstraintSystem.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -1144,15 +1144,14 @@ struct Score {
11441144
bool hasNonDefault = false;
11451145
for (unsigned int i = 0; i < NumScoreKinds; ++i) {
11461146
if (Data[i] != 0) {
1147-
out << " [";
1147+
out << " [component: ";
11481148
out << getNameFor(ScoreKind(i));
1149-
out << "(s) = ";
1149+
out << "(s), value: ";
11501150
out << std::to_string(Data[i]);
11511151
out << "]";
11521152
hasNonDefault = true;
11531153
}
11541154
}
1155-
11561155
if (!hasNonDefault) {
11571156
out << " <default ";
11581157
out << *this;

test/Constraints/one_way_solve.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ func testTernaryOneWayOverload(b: Bool) {
3838

3939
// CHECK: solving component #1
4040
// CHECK: (attempting type variable $T11 := Int8
41-
// CHECK: (found solution: [non-default literal(s) = 2] [use of overloaded unapplied function(s) = 2])
41+
// CHECK: (found solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
4242

43-
// CHECK: (composed solution: [non-default literal(s) = 2] [use of overloaded unapplied function(s) = 2])
44-
// CHECK-NOT: (composed solution: [non-default literal(s) = 2] [use of overloaded unapplied function(s) = 2])
43+
// CHECK: (composed solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
44+
// CHECK-NOT: (composed solution: [component: non-default literal(s), value: 2] [component: use of overloaded unapplied function(s), value: 2])
4545
let _: Int8 = b ? Builtin.one_way(int8Or16(17)) : Builtin.one_way(int8Or16(42))
4646
}

0 commit comments

Comments
 (0)