title: How to access an implicit conversion defined a class (in Scala)?
body: <p>I have an abstract class like so:</p>
  
  <pre><code>abstract class Base {
    val myInners = mutable.ArrayBuffer[Inner[Any]]()
    abstract class Inner[+T] {
      myInners += this
      def get: T
      // other functionality here
    }
    implicit def innerToValue[T](inner: Inner[T]) = inner.get
    class IntInner extends Inner[Int] { ... }
    class StringInner extends Inner[String] { ... }
    ...
  }
  </code></pre>
  
  <p>Initially I had a singleton object like</p>
  
  <pre><code>object MyObject extends Base {
    val intVal = new IntInner()
    val stringVal = new StringInner()
    ...
  }
  </code></pre>
  
  <p>And I was able to use these object members elsewhere like <code>functionThatExpectsAnInteger(MyObject.intVal)</code> which made me happy :).</p>
  
  <p>In order to improve testability, though, I'd like to make this <code>object</code> into a <code>class</code> and inject an instance of that class wherever it's being used. However by making <code>MyObject</code> into a class, I seem to be unable to use this implicit conversion anymore regardless of what I've tried, which makes me sad :(.</p>
  
  <p>Of course, this conversion only saves me calling a <code>get</code> method, and I can live without it, but I'm still learning about scala implicits and I'd like to understand why this doesn't work and if there <em>is</em> a way to do this.</p>