How to make implicits available to inner function
问题 I would like to define implicit value in a wrapper function and make it available to inner function, so far I managed to do that by passing implicit variable from wrapper: case class B() trait Helper { def withImplicit[A]()(block: => A): A = { implicit val b: B = B() block } } class Test extends Helper { def useImplicit()(implicit b: B): Unit = {...} def test = { withImplicit() { implicit b: B => useImplicit() } } } Is it possible to avoid implicit b: B => and make implicit val b: B = B()