From eaf6a2201bf29dcb18ea54417c2af89e32d11c4b Mon Sep 17 00:00:00 2001 From: liu fengyun Date: Wed, 9 Nov 2016 15:58:57 +0100 Subject: add mini tests to benchmarks --- bench/tests/implicit-scope-loop.scala | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 bench/tests/implicit-scope-loop.scala (limited to 'bench/tests/implicit-scope-loop.scala') diff --git a/bench/tests/implicit-scope-loop.scala b/bench/tests/implicit-scope-loop.scala new file mode 100644 index 000000000..162f1a52c --- /dev/null +++ b/bench/tests/implicit-scope-loop.scala @@ -0,0 +1,17 @@ +trait Dummy[T] + + +trait A[T] extends B +trait B extends Dummy[A[Int]] +object B { + implicit def theB: B = new B {} + implicit def theA: A[Int] = new A[Int] {} +} + +object Test { + def getB(implicit b: B) = b + def getA[T](implicit a: A[T]) = a + + getB + getA +} \ No newline at end of file -- cgit v1.2.3