title: scala: how to update super class attributes
body: <p>I am new to <em>scala</em> and have problem to update attributes.</p>
  
  <p>I have a class that inherits from an abstract class as follows:</p>
  
  <pre><code>abstract class A(x:type1,y:type1){
       val z:Option[type1]= None
       def void:type2 
  } 
  
  class B extends A(x,y){ 
       def this(x:type1,y:type1,z_:type1)= {this(x,y) val z=Some(z_)}
       def void:type2 = ??? 
  }
  </code></pre>
  
  <p>If I call  <code>new B(test,test,test)</code> it doesn't update the value of <code>z</code> which remains <code>None</code> all the time.</p>
  
  <p>What is the reason for this behavior?</p>