title: Scala - Option.getOrElse() "type erasure"?
body: <p>I am trying to use the <code>Option.getOrElse()</code> method but it returns etiher <code>Any</code> or <code>ScalaObject</code> instead of an instance of the correct class that the <code>Option</code> was parametrized with. I can't find any mention about this problem and it does not seem like it should be there. What am I doing wrong?</p>
  
  <pre><code>class MyClass {
  
    def isOk = true
  
  }
  
  val myVal = Some(new MyClass) // :Option[MyClass]
  
  val check = myVal.getOrElse(false).isOk
  </code></pre>
  
  <p>Can't call the <code>isOk</code> method because it tries calling it upon <code>Any</code>.</p>