From 3617102b51df4625cbe37f6a3f71caf64ddf7211 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 27 Jan 2014 16:06:41 +0100 Subject: Selective caching of SelectionProtos and ViewProtos We cache SelectionProtos if their "compat" parameter is "NoViewsAllowed". We always cache ViewProtos. That's important for implicit search, because this enables eligible refs to be better cached. To make this work, we add a case to WildApprox which massages SelectionProtos so they also get noViewsAllowed in the compat parameter. --- src/dotty/tools/dotc/typer/Applications.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/typer/Applications.scala') diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index f504ffacd..63117e2ac 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -449,7 +449,7 @@ trait Applications extends Compatibility { self: Typer => // implicit conversion around []. (an example is Int + BigInt). tryEither { implicit ctx => val simpleFunProto = new FunProto(tree.args, WildcardType, this) // drop result type, because views are disabled - val selProto = new SelectionProto(name, simpleFunProto, NoViewsAllowed) + val selProto = SelectionProto(name, simpleFunProto, NoViewsAllowed) val qual1 = adaptInterpolated(qual, selProto) if (qual eq qual1) ctx.error("no progress") if (ctx.reporter.hasErrors) qual1 -- cgit v1.2.3