title: Why does an operation on a Child instance returns an instance of parent's type?
body: <p>I think there is some flaws in my understanding of inheritance in Scala.</p>
  
  <p>Why does appending an element to my own defined class <code>test</code> returns an instance of <code>scala.collection.immutable.HashSet[String]</code> and not one of <code>test</code> ?</p>
  
  <pre><code>scala&gt; class test extends scala.collection.immutable.HashSet[String]
  defined class test
  scala&gt; var hashSet: test = new test
  hashSet: test = Set()
  scala&gt; val set2 = hashSet + "1234"
  set2: scala.collection.immutable.HashSet[String] = Set(1234)
  </code></pre>