title: Force dependent types resolution for implicit calls
body: <p>I have a wrapper trait :</p>
  
  <pre class="lang-scala prettyprint-override"><code>
  trait Wrapper[T] {
  
    ...
    type Own[F[_]] &lt;: OwnThing[F]
    def ask[F[_]](implicit own: Own[F])
  
  }
  </code></pre>
  
  <p>And different implementations, here is an example :</p>
  
  <pre class="lang-scala prettyprint-override"><code>class CombinedWrapper[A, B](wrapperA: Wrapper[A], wrapperB: Wrapper[B]) extends Wrapper[(A, B)] {
    override type Own[F[_]] = SomeOwnThing[(A, B), wrapperA.Own[F], wrapperB.Own[F]]
    override def ask[F[_]](implicit own: Own[F]) = ???
  }
  </code></pre>
  
  <p>But the implicit resolution will not resolve the path-dependent types, therefore not finding any implicits.</p>
  
  <p>Is there a way to force the resolution of path-dependent types?
  As for now, I just think of them as variables but at the type level.</p>
  
  <p>Edit : 
  A more complete version:</p>
  
  <pre class="lang-scala prettyprint-override"><code>
  trait Wrapper[T] {
  
    ...
    type Own[F[_]] &lt;: OwnThing[F, T]
    def ask[F[_]](implicit own: Own[F])
  
  }
  
  sealed trait OwnThing[F[_], A]
  
  trait SomeOwnThing[F[_], A, B, ThingA &lt;: OwnThing[F, A], ThingB &lt;: OwnThing[F, B]] extends OwnThing[F, (A, B)] {
    def underlyingA: ThingA
    def underlyingB: ThingB
  }
  
  class CombinedWrapper[A, B](wrapperA: Wrapper[A], wrapperB: Wrapper[B]) extends Wrapper[(A, B)] {
    override type Own[F[_]] = SomeOwnThing[F, A, B, wrapperA.Own[F], wrapperB.Own[F]]
    override def ask[F[_]](implicit own: Own[F]) = ???
  }
  </code></pre>
  
  <p>Edit2: A non-working example</p>
  
  <pre class="lang-scala prettyprint-override"><code>trait SimpleOwn[F[_], A] extends OwnThing[F, A]
  
  class SimpleWrapper[T] extends Wrapper[T] {
      override type Own[F[_]] = SimpleOwn[F, T]
      override def ask[F[_]](implicit own: Own[F]) = ???
    }
  
  val combined = new CombinedWrapper[String, Int](new SimpleWrapper[String], new SimpleWrapper[Int])
  type Id[A] = A
  
  //Simple case for base types
  implicit val intOwn: SimpleOwn[Id, Int] = new SimpleOwn[Id, Int]
  implicit val stringOwn: SimpleOwn[Id, String] = new SimpleOwn[Id, String]
  
  //Should combine the two above
  implicit def composeOwnIds[A, B, ThingA &lt;: OwnThing[Id, A], ThingB &lt;: OwnThing[Id, B]](implicit aOwn: ThingA, bOwn: ThingB): SomeOwnThing[Id, A, B, ThingA, ThingB] = new SomeOwnThing {
    override def underlyingA: ThingA = aOwn
    override def underlyingB: ThingB = bOwn
  }
  
  //Should work but cant find implicit
  combined.ask[Id]
  </code></pre>
  
  <p>Edit3: For me, the root of the problem is in <code>CombinedWrapper</code> at the type member definition. I think Scala does not resolve the path-dependent-types use in the definition.</p>
  
  <p>I can say this because</p>
  
  <pre class="lang-scala prettyprint-override"><code>new SimpleWrapper[String].ask
  </code></pre>
  
  <p>does compile</p>