From 939d9da26ee5992c17cd1fae0a501ed66a49fb95 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 4 Jun 2016 18:21:11 +0200 Subject: 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. --- src/dotty/tools/dotc/core/ConstraintHandling.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/ConstraintHandling.scala') 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 } -- cgit v1.2.3