aboutsummaryrefslogtreecommitdiff
path: root/bench/tests/implicit_cache.scala
diff options
context:
space:
mode:
Diffstat (limited to 'bench/tests/implicit_cache.scala')
-rw-r--r--bench/tests/implicit_cache.scala16
1 files changed, 16 insertions, 0 deletions
diff --git a/bench/tests/implicit_cache.scala b/bench/tests/implicit_cache.scala
new file mode 100644
index 000000000..d124876e0
--- /dev/null
+++ b/bench/tests/implicit_cache.scala
@@ -0,0 +1,16 @@
+class A
+object A {
+ implicit def theA: A = new A
+}
+class Foo[T]
+object Foo {
+ implicit def theFoo: Foo[A] = new Foo[A]
+}
+
+object Test {
+ def getFooA(implicit foo: Foo[A]) = foo
+ def getA(implicit a: A) = a
+
+ getFooA
+ getA
+}