Does anyone know what's going on here with this compiler error? The error goes away if I don't extend INode.
trait AbsTypes
{
type TKey
type TValue
}
trait INode extends AbsTypes
{
def get(key : TKey) : TValue
def set(key : TKey, v : TValue) : INode
}
class ANode[TKey,TValue](
val akey : TKey,
val aval : TValue
) extends INode
{
// ERROR : type mismatch; found : ANode.this.aval.type (with underlying type TValue) required: ANode.this.TValue
def get(key : TKey) : TValue = { aval }
def set(key : TKey, v : TValue) : INode = {
new ANode(key,v)
}
}