Skip to content

Commit af5010d

Browse files
committed
Further improve GadtConstraint comment
1 parent cb15213 commit af5010d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ final class ProperGadtConstraint private(
167167
// class Foo[F[t] >: List[t]]
168168
// type T = Foo[List]
169169
// precisely because Foo[List] is desugared to Foo[[A] => List[A]].
170+
//
171+
// Ideally we'd adapt the bound in ConstraintHandling#addOneBound,
172+
// but doing it there actually interferes with type inference.
170173
val bound1 = bound.adaptHkVariances(oldUpperBound)
171174
if (isUpper) addUpperBound(symTvar.origin, bound1)
172175
else addLowerBound(symTvar.origin, bound1)

0 commit comments

Comments
 (0)