aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/implicit_cache.scala
blob: d124876e02743e872be316140c7b1122090e8378 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
}