title: Scala type projection with higher-kinded type
body: <p>Consider the following:</p>
  
  <pre><code>trait Foo {
    type F[_]
    type A
    type FA = F[A]
    def get: FA
  }
  
  class SeqStringFoo extends Foo {
    type F[_] = Seq[_]
    type A = String
    def get: Seq[String] = Seq("hello world")
  }
  
  def exec[F &lt;: Foo](foo: F): F#FA = foo.get
  
  val seq1: Seq[Any] = exec(new SeqStringFoo()) // Seq[Any] = List(hello world)
  val seq2: Seq[String] = exec(new SeqStringFoo()) // Error: Expression SeqIntFoo#FA doesn't conform to Seq[String]
  </code></pre>
  
  <p><code>seq2</code> doesn't compile since for some reason, type information of wrapped type <code>String</code> is lost when using <strong>type projection</strong> <code>F#FA</code>.</p>
  
  <p>This doesn't happen when returned type <strong>isn't</strong> higher-kinded type. </p>
  
  <p>Why does this happen?</p>
  
  <p>How can I work around this?</p>