title: Scala manifest taken from variable and not instance?
body: <p>I'm not quite sure how to phrase this question because I don't really understand what is going on.  But where I would expect a manifest to be able to tell me the actual runtime type of an instance, it seems to be telling me the runtime type of the variable it is assigned to.</p>
  
  <pre><code>// scala 2.10.1
  trait Base
  class Impl1 extends Base
  class Impl2 extends Base
  
  def showManifest[T &lt;: Base](thing: T)(implicit ev: Manifest[T]) = println(thing + ": " + ev.runtimeClass)
  
  val (impl1, impl2) = (new Impl1, new Impl2)
  
  println("=== impl1 and impl2 ===")
  showManifest(impl1)
  showManifest(impl2)
  
  val choose1 = if(true) impl1 else impl2
  val choose2 = if(false) impl1 else impl2
  
  println("=== choose1 and choose2 ===")
  showManifest(choose1)
  showManifest(choose2)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>=== impl1 and impl2 ===
  Main$$anon$1$Impl1@48ff2413: class Main$$anon$1$Impl1
  Main$$anon$1$Impl2@669980d5: class Main$$anon$1$Impl2
  === choose1 and choose2 ===
  Main$$anon$1$Impl1@48ff2413: interface Main$$anon$1$Base
  Main$$anon$1$Impl2@669980d5: interface Main$$anon$1$Base
  </code></pre>
  
  <p>So, the type of choose1 and choose2 is Base, is that why the method ends up with Manifest[Base]?  Is there a way around this, so that I can pick a type I don't know at compile time (chosen by config parameter or the like) and pass it to a factory method?</p>