title: Scala Cast object to another type
body: <p>I want to make following code not throw any error </p>
  
  <pre><code>case class A(value: String)
  val a = A("I hope to be string one day") 
  val value = a.asInstanceOf[String] // java.lang.ClassCastException: A cannot be cast to java.lang.String
  </code></pre>
  
  <p>I want to modify class A such that below work</p>
  
  <pre><code>val value = a.asInstanceOf[String] // I hope to be string one day
  </code></pre>
  
  <p>does anybody knows the solution? </p>