Depending on order of traits, private members can shadow inherited members and prevent compilation. This does not happen with separate compilation.
scala> :pa
// Entering paste mode (ctrl-D to finish)
trait A { private val x = 1 }
trait B { val x = 2 }
trait C extends B with A { println(x) }
// Exiting paste mode, now interpreting.
<console>:9: error: value x in trait A cannot be accessed in C
trait C extends B with A { println(x) }
^
scala> :reset
Resetting interpreter state.
scala> trait A { private val x = 1 }
defined trait A
scala> trait B { val x = 2 }
defined trait B
scala> trait C extends B with A { println(x) }
defined trait C
Expected behavior (to me anyway) is that private members (which are not inherited) should not shadow inherited members when resolving symbols in subclasses. But in either case behavior should be consistent between combined and separate compilation.
Edit: damn this editor/formatter.
Depending on order of traits, private members can shadow inherited members and prevent compilation. This does not happen with separate compilation.
Expected behavior (to me anyway) is that private members (which are not inherited) should not shadow inherited members when resolving symbols in subclasses. But in either case behavior should be consistent between combined and separate compilation.
Edit: damn this editor/formatter.