diff options
author | Martin Odersky <odersky@gmail.com> | 2014-01-27 16:06:41 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-01-27 19:27:10 +0100 |
commit | 3617102b51df4625cbe37f6a3f71caf64ddf7211 (patch) | |
tree | 126395f38546b865c0a8e4928dfce1ef68f072fe /src/dotty/tools/dotc/typer/Applications.scala | |
parent | c476171d838c55bbfe36856e73a470e826748acc (diff) | |
download | dotty-3617102b51df4625cbe37f6a3f71caf64ddf7211.tar.gz dotty-3617102b51df4625cbe37f6a3f71caf64ddf7211.tar.bz2 dotty-3617102b51df4625cbe37f6a3f71caf64ddf7211.zip |
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.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Applications.scala | 2 |
1 files changed, 1 insertions, 1 deletions
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 |