title: Type parametrization and inheritance in Scala
body: <p>I have Scala code following the pattern below.</p>
  
  <pre><code>class T
  
  class A1[S &lt;: T](private val arg1: String, private val arg2: S)
  class A2[S &lt;: T](private val arg1: String, private val arg2: S)
    extends A1[S]
  class A3[S &lt;: T](private val arg1: String, private val arg2: S)
    extends A2[S]
  </code></pre>
  
  <p>etc.</p>
  
  <p>I am hoping that there is some way to shorten the above code because there is a lot of repetition here. I would like subclasses of <code>A1</code> to implicitly have the type parametrization <code>[S &lt;: T]</code> and the constructor <code>(private val arg1: String, private val arg2: S)</code>. Is there any way to accomplish this, or is it necessary to repeat this text for every subclass I define?</p>