aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Implicits.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-02-02 18:43:05 +0100
committerMartin Odersky <odersky@gmail.com>2014-02-02 18:43:28 +0100
commit19c8cb1bca7a07395446a0cceaab137e5af2c8c5 (patch)
tree627ff8dd6dfc3e71eb0e8d59105f05515c3f6b81 /src/dotty/tools/dotc/typer/Implicits.scala
parentf0d34873c27cfbf7dab3909b9855dfeae4e8506e (diff)
downloaddotty-19c8cb1bca7a07395446a0cceaab137e5af2c8c5.tar.gz
dotty-19c8cb1bca7a07395446a0cceaab137e5af2c8c5.tar.bz2
dotty-19c8cb1bca7a07395446a0cceaab137e5af2c8c5.zip
Improve eligible caching in implicit search.
Improves effectiveness of elidable cache from ~66% to ~85% and reduces # of implicits that need to be checked after discarding to about 20% what it was before.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Implicits.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Implicits.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala
index 2bd1731da..68ec9273a 100644
--- a/src/dotty/tools/dotc/typer/Implicits.scala
+++ b/src/dotty/tools/dotc/typer/Implicits.scala
@@ -429,7 +429,7 @@ trait Implicits { self: Typer =>
private def nestedContext = ctx.fresh.withNewMode(ctx.mode &~ Mode.ImplicitsEnabled)
private def implicitProto(resultType: Type, f: Type => Type) =
- if (argument.isEmpty) f(resultType) else ViewProto(f(argument.tpe), f(resultType))
+ if (argument.isEmpty) f(resultType) else ViewProto(f(argument.tpe.widen), f(resultType))
assert(argument.isEmpty || argument.tpe.isValueType || argument.tpe.isInstanceOf[ExprType],
i"found: ${argument.tpe}, expected: $pt")