Skip to content

Commit 25e311f

Browse files
committed
Address review comments
1 parent 9e2d250 commit 25e311f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
140140
finally useNecessaryEither = saved
141141

142142
/** Use avoidance to get rid of wildcards in constraint bounds if
143-
* we are doing a neccessary comparison, or the mode is TypeVarsMissContext.
143+
* we are doing a necessary comparison, or the mode is TypeVarsMissContext.
144144
* The idea is that under either of these conditions we are not interested
145145
* in creating a fresh type variable to replace the wildcard. I verified
146146
* that several tests break if one or the other part of the disjunction is dropped.
147+
* (for instance, i12677.scala demands `useNecessaryEither` in the condition)
147148
*/
148149
override protected def approximateWildcards: Boolean =
149150
useNecessaryEither || ctx.mode.is(Mode.TypevarsMissContext)

0 commit comments

Comments
 (0)