Skip to content

Commit

Permalink
Revert "Add type avoidance to inferred MT bound lubbing"
Browse files Browse the repository at this point in the history
This reverts commit 2f6e60d.
  • Loading branch information
WojciechMazur committed Feb 25, 2025
1 parent bc3e415 commit b19dffd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2665,7 +2665,7 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
val lub = cases1.foldLeft(defn.NothingType: Type): (acc, case1) =>
if !acc.exists then NoType
else if case1.body.tpe.isProvisional then NoType
else acc | TypeOps.avoid(case1.body.tpe, case1.pat.bindTypeSymbols)
else acc | case1.body.tpe
if lub.exists then
if !lub.isAny then
val msg = em"Match type upper bound inferred as $lub, where previously it was defaulted to Any"
Expand Down
5 changes: 0 additions & 5 deletions tests/pos/i21256.scala

This file was deleted.

0 comments on commit b19dffd

Please sign in to comment.