Oh, but sometimes this can be the intuitive thing to do. For example, this does not compile:
trait Define :
type Test
trait Trait(define: Define) :
type Test = define.Test
where the error is:
non-private type Test in trait Trait refers to private value define
in its type signature = Trait.this.define.Test
whereas this does:
trait Define :
type Test
trait Trait(val define: Define) :
type Test = define.Test
Of course you can circumvent it with an auxiliary variable:
trait Define :
type Test
trait Trait(define: Define) :
val aux = define
type Test = aux.Test
but that is not very ‘DRY’. BTW, it is not clear to me why the first example does not compile, i asked it before on this forum, but nobody seemed to know the answer.