diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2016-05-31 15:23:04 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-05-31 16:53:22 +0200 |
commit | be418e06756a3b8ddc3f748008995155260eb7ae (patch) | |
tree | b710a29e7d556cc127d43580860beb9b0d25cc19 /tests/pos | |
parent | 5838fda0234b224203b1a304a11992e8c7c004c3 (diff) | |
download | dotty-be418e06756a3b8ddc3f748008995155260eb7ae.tar.gz dotty-be418e06756a3b8ddc3f748008995155260eb7ae.tar.bz2 dotty-be418e06756a3b8ddc3f748008995155260eb7ae.zip |
Document why we cannot cache all implicit scopes
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/implicit-scope-loop.scala | 17 |
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 |