Is there a way to reference a generic type parameter that is shadowed by an abstract type member of the same name?
Suppose we have a trait and extending class:
trait Foo {
type T
var get: T = _
}
class Bar[X] extends Foo {
override type T = X //We can set the type member by referencing the generic parameter X
}
class Baz[T] extends Foo {
override type T = ??? //How can we reference the generic parameter T here?
}
Obviously it's usually not a big deal to just name the generic parameter different than the type member, but this isn't always the best option (for example, when using an external library). Is there a way to reference the shadowed generic parameter? Where in the Scala spec is this interaction between type members and generic parameters delineated?