title: How to specifiy shared super type as parameter in Scala?
body: <p>I need some help on this scenario: </p>
  
  <p>A trait defines an shared interface with some methods.
  One of the methods should look like this </p>
  
  <pre><code> def fromConfig( config : Config): 
  </code></pre>
  
  <p>Each implementation should override the method with something like:</p>
  
  <pre><code>  override def fromConfig(config: SubConfigA)
  </code></pre>
  
  <p>However, doing so gives "Method .. overrides nothing" error<br>
  even though the config stuff is defined as  </p>
  
  <pre><code>  abstract class Config
    trait SubConfigA extends Config
    trait SubConfigB extends Config 
    ....
  </code></pre>
  
  <p>I remember, in Java you actually can define an interface as parameter,
  and use sub-interfaces in subclasses for refinement.</p>
  
  <p>Apparently the same does not work in Scala.  </p>
  
  <p>The code above is just a draft but the idea is passing 
  specific configurations matching to a specific implementation 
  of the shared interface. </p>
  
  <p>Any idea or advice would be most appreciated.</p>
  
  <p>Thank you </p>