diff options
author | Martin Odersky <odersky@gmail.com> | 2014-02-02 18:43:05 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-02-02 18:43:28 +0100 |
commit | 19c8cb1bca7a07395446a0cceaab137e5af2c8c5 (patch) | |
tree | 627ff8dd6dfc3e71eb0e8d59105f05515c3f6b81 /tests | |
parent | f0d34873c27cfbf7dab3909b9855dfeae4e8506e (diff) | |
download | dotty-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 'tests')
-rw-r--r-- | tests/neg/implicitDefs.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/neg/implicitDefs.scala b/tests/neg/implicitDefs.scala new file mode 100644 index 000000000..28ac32656 --- /dev/null +++ b/tests/neg/implicitDefs.scala @@ -0,0 +1,11 @@ +package test + +import dotty._ +import Predef.{any2stringadd => _, StringAdd => _, _} + +object implicitDefs { + + implicit val x = 2 + implicit def y(x: Int) = 3 + implicit def z(a: x.type): String = "" +} |