diff options
author | Martin Odersky <odersky@gmail.com> | 2016-06-04 18:21:11 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-07-11 13:35:00 +0200 |
commit | 939d9da26ee5992c17cd1fae0a501ed66a49fb95 (patch) | |
tree | 7efeb8e2cc3f4fdcfcbbf8b06051b3b4fc55240b /src/dotty/tools/dotc/core/ConstraintHandling.scala | |
parent | ae1f248ff407b231455a43ecbaf4751c0bb2bbaa (diff) | |
download | dotty-939d9da26ee5992c17cd1fae0a501ed66a49fb95.tar.gz dotty-939d9da26ee5992c17cd1fae0a501ed66a49fb95.tar.bz2 dotty-939d9da26ee5992c17cd1fae0a501ed66a49fb95.zip |
Add a second betaReduce
The new one only reduces straight applications of type lambdas with
definite arguments. It is called very early on appliedTo, and derivedRefinedType.
The old one, now renamed to normalizeHkApply also handles wildcard arguments
and can garbage collect general unneeded hk-refinements. It is called later, at various
places.
TODO: See what functionality of normalizeHkApply should go into betaReduce instead.
Maybe we can even drop normalizeHkApply? However: need to be careful to maintain aliases
for hk type inference.
Diffstat (limited to 'src/dotty/tools/dotc/core/ConstraintHandling.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/ConstraintHandling.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/ConstraintHandling.scala b/src/dotty/tools/dotc/core/ConstraintHandling.scala index 3b368ad5e..8072a111a 100644 --- a/src/dotty/tools/dotc/core/ConstraintHandling.scala +++ b/src/dotty/tools/dotc/core/ConstraintHandling.scala @@ -286,7 +286,7 @@ trait ConstraintHandling { else if (fromBelow) defn.NothingType else defn.AnyType case bound: RefinedType => - bound.BetaReduce + bound.normalizeHkApply case _ => bound } |