Scala nested case class self-bounding inheritance
<p>I'm currently working on a A* implementation in Scala. To accomplish a clean structure I would like to use a nested case class structure which implements a self-bounded trait. However, I experience some issues when implementing this in the Scala IDE. The following code will not compile:</p>

<pre><code>trait A[T &lt;: A[T]]

class B {

    case class C(int: Int) extends A[C] // A[this.C] won't work either

    def make = C(5)

}

object D {

    def foo[T &lt;: A[T]](some: T) = {}

    val c = new B().make

    foo(c) // this does not compile

}
</code></pre>

<p>Is there any way I can make this structure work?</p>