aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-06-02 18:46:49 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-11 13:34:59 +0200
commite56bd1fe7a5d2a3821e8c44f0ce35b75be8d7d2b (patch)
tree4708d1cba246fd6093a243be9b6bd59860b6ecb4 /src
parent5daae278392ed6fabd45c9fa55aded970ca2a348 (diff)
downloaddotty-e56bd1fe7a5d2a3821e8c44f0ce35b75be8d7d2b.tar.gz
dotty-e56bd1fe7a5d2a3821e8c44f0ce35b75be8d7d2b.tar.bz2
dotty-e56bd1fe7a5d2a3821e8c44f0ce35b75be8d7d2b.zip
Beta-reduce when simplifying
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index bb9566b6f..46771a5aa 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -158,6 +158,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
tp
case tp: RefinedType =>
tp.derivedRefinedType(simplify(tp.parent, theMap), tp.refinedName, simplify(tp.refinedInfo, theMap))
+ .BetaReduce()
case tp: TypeAlias =>
tp.derivedTypeAlias(simplify(tp.alias, theMap))
case AndType(l, r) =>
@@ -383,7 +384,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
var formals: SimpleMap[TypeName, Symbol] = SimpleMap.Empty // A map of all formal parent parameter
// Strip all refinements from parent type, populating `refinements` and `formals` maps.
- def normalizeToRef(tp: Type): TypeRef = tp.dealias.BetaReduce match {
+ def normalizeToRef(tp: Type): TypeRef = tp.dealias.BetaReduce() match {
case tp: TypeRef =>
tp
case tp @ RefinedType(tp1, name: TypeName, rinfo) =>