Skip to content

Commit

Permalink
Update compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky authored Mar 28, 2024
1 parent 9c80a7c commit b9430cb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2529,6 +2529,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
if isSuperOf(sub) then NoType else tp
end dropIfSuper

/** If some (|-operand of) `tp` is a subtype of `sup` replace it with `NoType`. */
private def dropIfSub(tp: Type, sup: Type, canConstrain: Boolean): Type =

def isSubOf(sup: Type): Boolean = sup match
Expand Down

0 comments on commit b9430cb

Please sign in to comment.