title: Covariance in Tagged Type
body: <p>I've created such tagged types from Miles Sabin gist example:</p>
  
  <pre><code>  type Tagged[U] = { type Tag = U }
    type @@[T, U] = T with Tagged[U]
  
    sealed trait A
    sealed trait E
    sealed trait B extends E
    sealed trait C extends E
    def a(a: String): String @@ A = a.asInstanceOf[String @@ A]
    def b(a: String): String @@ B = a.asInstanceOf[String @@ B]
    def c(a: String): String @@ C = a.asInstanceOf[String @@ C]
  </code></pre>
  
  <p>I have a method:</p>
  
  <pre><code> def f(e: String @@ E) = ???
  </code></pre>
  
  <p>I want this method to take both <code>String @@ B</code> and <code>String @@ C</code> types since both <code>B</code> and <code>C</code> extend <code>E</code>. How can I do it? I tried to make <code>@@</code> covariant:</p>
  
  <pre><code>type Tagged[U] = { type Tag = U }
  type @@[T, +U] = T with Tagged[U]
  </code></pre>
  
  <p>but it doesn't help - I can only pass objects of type <code>String @@ E</code>.</p>