1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
class Foo object Test { def foo[T](x: T)(implicit ev: T): T = ??? class Fn[T] { def invoke(implicit ev: T): T = ??? } def bar[T](x: T): Fn[T] = ??? def test: Unit = { implicit val evidence: Foo = new Foo foo(new Foo) bar(new Foo).invoke } }