Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Jun 8, 2021
1 parent 9e2d250 commit 25e311f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
finally useNecessaryEither = saved

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

0 comments on commit 25e311f

Please sign in to comment.