title: Scala Upper Bounds : value is not a member of type parameter
body: <p>Why can the Price not find the attribute value on the SeqValue? It seems so simple that is should work.</p>
  
  <p>Im getting the error</p>
  
  <pre><code>[error]   .... value value is not a member of type parameter SeqValue
  [error]   def recalc[SeqValue](input:SeqValue) = Price(1 + seq, input.value)    
  </code></pre>
  
  <p>for the following code</p>
  
  <pre><code>sealed trait SeqValue {
    def seq:Int
    def value:Float
    override def toString = ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE)
  }
  
  sealed trait Calc {
    type S &lt;: SeqValue
    def recalc[S](input:S):SeqValue
  }
  
  case class Price(seq:Int=0, value:Float=.0f) extends SeqValue with Calc {
    def recalc[SeqValue](input:SeqValue) = Price(1 + seq, input.value)
  }
  </code></pre>
  
  <p>The idea is that you can recalc on the price object, and pass in any type of object that implements SeqValue, because SeqValue has a value.</p>