aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/implicit-scope-loop.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-05-31 15:23:04 +0200
committerGuillaume Martres <smarter@ubuntu.com>2016-05-31 16:53:22 +0200
commitbe418e06756a3b8ddc3f748008995155260eb7ae (patch)
treeb710a29e7d556cc127d43580860beb9b0d25cc19 /tests/pos/implicit-scope-loop.scala
parent5838fda0234b224203b1a304a11992e8c7c004c3 (diff)
downloaddotty-be418e06756a3b8ddc3f748008995155260eb7ae.tar.gz
dotty-be418e06756a3b8ddc3f748008995155260eb7ae.tar.bz2
dotty-be418e06756a3b8ddc3f748008995155260eb7ae.zip
Document why we cannot cache all implicit scopes
Diffstat (limited to 'tests/pos/implicit-scope-loop.scala')
-rw-r--r--tests/pos/implicit-scope-loop.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/implicit-scope-loop.scala b/tests/pos/implicit-scope-loop.scala
new file mode 100644
index 000000000..162f1a52c
--- /dev/null
+++ b/tests/pos/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