Is there a way to refer to a parameter of a general type that is obscured by a member of an abstract type with the same name?
Suppose we have a class and an extension class:
trait Foo {
type T
var get: T = _
}
class Bar[X] extends Foo {
override type T = X
}
class Baz[T] extends Foo {
override type T = ???
}
Obviously, it is usually not easy to name a general parameter that is different from a type member, but this is not always the best option (for example, when using an external library). Is there a way to refer to a shaded general parameter? Where in the Scala spec is this interaction between type members and common parameters?
source
share