Skip to content

Commit 3367d5b

Browse files
committed
Clarify comment
1 parent 5cb6c76 commit 3367d5b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

compiler/src/dotty/tools/dotc/core/TypeOps.scala

+7-7
Original file line numberDiff line numberDiff line change
@@ -215,13 +215,13 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
215215
// So we need to widen `C` first. But how to decide this in general?
216216
// In the algorithm below, we try to widen both sides (once), and then proceed as follows:
217217
//
218-
// 0. If no widening succeeds, proceed with step 3.
219-
// 1. If only one widening succeeds, pick that one.
220-
// 2. If the two widened types are in a subtype relationship, pick the smaller one.
221-
// 3. If exactly one of the two types is a singleton type, pick that one.
222-
// 4. If the widened tp1 is a supertype of tp2, pick widened tp1.
223-
// 5. If the widened tp2 is a supertype of tp1, pick widened tp2.
224-
// 6. Otherwise, pick tp1
218+
// 2.0. If no widening succeeds, proceed with step 3.
219+
// 2.1. If only one widening succeeds, pick that one.
220+
// 2.2. If the two widened types are in a subtype relationship, pick the smaller one.
221+
// 2.3. If exactly one of the two types is a singleton type, pick that one.
222+
// 2.4. If the widened tp1 is a supertype of tp2, pick widened tp1.
223+
// 2.5. If the widened tp2 is a supertype of tp1, pick widened tp2.
224+
// 2.6. Otherwise, pick tp1
225225
//
226226
// At steps 4-6 we lose possible solutions, since we have to make an
227227
// arbitrary choice which side to widen. A better solution would look at

0 commit comments

Comments
 (0)