title: How to refer to a parameterized method?
body: <p>Here is a code structure:</p>
  
  <pre><code>trait Foo[T &lt;: Foo[_]] {
    def makeACopy[T](attr01_p: Option[String], ...): T
    ...
  }
  
  case class Bar extend Foo[Bar] {
    def makeACopy[Bar](attr01_p: Option[String], ...): org.myapp.domain.model.Bar = copy(attr01 = attr01_p, ...)
    ...
  }
  </code></pre>
  
  <p>Now, a method in another class needs to refer to the method makeACopy.</p>
  
  <pre><code>class Qux(...){
    ...
    private def myMethod[T &lt;: Foo](id: Long, getter: Long =&gt; Option[T], ...): Option[T] = {
      val b = getter(id)
      b match {
        case Some(bar) =&gt; bar.makeACopy[T](...) // &lt;== It isn't right
        case None =&gt; ...
    }
  }
  </code></pre>
  
  <p>I get a complying error for invoking the makeACopy method although I already specify the parameter as a sub-type of Foo and Intellij IDEA doesn't complain the line:</p>
  
  <pre><code>value makeACopy is not a member of type parameter T 
  </code></pre>
  
  <p>Why? And how to solve it?</p>
  
  <p>Also, I am not sure why I have to have a full path for returned data type of makeACopy in Bar. Otherwise, the IDE will complain returned type mismatch.</p>