No.
Path dependent types are scoped to an object instance, as in the example you gave:
def f[ A <: Outer ]( a:A )( i:a.Inner ) = (a,i)
Here the path-dependent type relies on the object reference "a", which is in scope for the declaration of the second parameter list.
The map definition looks a bit like:
trait Map[A,+B] {
def get(key: A): Option[B]
def + [B1 >: B](kv: (A, B1)): This
}
There is no object of type A
in scope here for you to reference when defining B
.
As others have hinted, you could define a new similar Map class which fits this requirement:
trait Map2[A <: Outer] {
def get(key: A): Option[key.Inner]
def put(key: A)(value: key.Inner): this.type
}