title: Why is the Manifest not available in the constructor?
body: <p>Consider this code:</p>
  
  <pre><code>class Foo[T : Manifest](val id: String = manifest[T].erasure.getName)
  </code></pre>
  
  <p>I basically want to store an identifier in Foo, which is often just the class name.</p>
  
  <p>Subclass which do not need a special identifier could then easily use the default value.</p>
  
  <p>But this doesn't even compile, the error message is:</p>
  
  <pre><code>error: No Manifest available for T.
  </code></pre>
  
  <p>Is there another approach which will work?</p>
  
  <p>EDIT:</p>
  
  <p>Why does this work if the manifest isn't available until the primary constructor?</p>
  
  <pre><code>class Foo[T: Manifest](val name: String) { 
    def this() = this(manifest[T].erasure.getName)
  }
  </code></pre>