1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
package test; trait B { type Node <: NodeImpl; trait NodeImpl { def self : Node; def chilren : List[Node]; } } trait C extends B { type Node <: NodeImpl; trait NodeImpl extends super.NodeImpl { override def children = super.chilren; children; } }