Skip to content

Commit e56bd1f

Browse files
committed
Beta-reduce when simplifying
1 parent 5daae27 commit e56bd1f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
158158
tp
159159
case tp: RefinedType =>
160160
tp.derivedRefinedType(simplify(tp.parent, theMap), tp.refinedName, simplify(tp.refinedInfo, theMap))
161+
.BetaReduce()
161162
case tp: TypeAlias =>
162163
tp.derivedTypeAlias(simplify(tp.alias, theMap))
163164
case AndType(l, r) =>
@@ -383,7 +384,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
383384
var formals: SimpleMap[TypeName, Symbol] = SimpleMap.Empty // A map of all formal parent parameter
384385

385386
// Strip all refinements from parent type, populating `refinements` and `formals` maps.
386-
def normalizeToRef(tp: Type): TypeRef = tp.dealias.BetaReduce match {
387+
def normalizeToRef(tp: Type): TypeRef = tp.dealias.BetaReduce() match {
387388
case tp: TypeRef =>
388389
tp
389390
case tp @ RefinedType(tp1, name: TypeName, rinfo) =>

0 commit comments

Comments
 (0)