Skip to content

Commit da0e938

Browse files
authored
Merge pull request #9019 from dotty-staging/fix-simplification
Remove incorrect type simplification
2 parents 38272aa + d08609b commit da0e938

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

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

+2-8
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,8 @@ object TypeOps:
137137
case tp1 => tp1
138138
}
139139
case tp: TypeParamRef =>
140-
if (tp.paramName.is(DepParamName)) {
141-
val bounds = ctx.typeComparer.bounds(tp)
142-
if (bounds.lo.isRef(defn.NothingClass)) bounds.hi else bounds.lo
143-
}
144-
else {
145-
val tvar = ctx.typerState.constraint.typeVarOfParam(tp)
146-
if (tvar.exists) tvar else tp
147-
}
140+
val tvar = ctx.typerState.constraint.typeVarOfParam(tp)
141+
if (tvar.exists) tvar else tp
148142
case _: ThisType | _: BoundType =>
149143
tp
150144
case tp: AliasingBounds =>

0 commit comments

Comments
 (0)