Skip to content

Commit 22539fe

Browse files
Don't simplify MT right-hand sides
1 parent a43cf8a commit 22539fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ object TypeOps:
137137
tp2
138138
case tp1 => tp1
139139
}
140+
case defn.MatchCase(pat, body) =>
141+
defn.MatchCase(simplify(pat, theMap), body)
140142
case tp: AppliedType =>
141143
tp.tycon match
142144
case tycon: TypeRef if tycon.info.isInstanceOf[MatchAlias] =>
@@ -485,7 +487,7 @@ object TypeOps:
485487
tp
486488
else tryWiden(tp, tp.prefix).orElse {
487489
if (tp.isTerm && variance > 0 && !pre.isSingleton)
488-
apply(tp.info.widenExpr)
490+
apply(tp.info.widenExpr)
489491
else if (upper(pre).member(tp.name).exists)
490492
super.derivedSelect(tp, pre)
491493
else

0 commit comments

Comments
 (0)