fork download
  1. class A {
  2. val log = 1
  3. }
  4.  
  5. trait B {
  6. private val log = ""
  7. }
  8.  
  9. trait BB extends B {
  10. //no way to use log
  11. // log
  12. }
  13.  
  14. trait C extends A with BB {
  15. }
  16.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.scala:14: error: overriding value log in class A of type Int;
 value log in trait B of type java.lang.String has weaker access privileges; it should not be private
  trait C extends A with BB {
        ^
one error found
stdout
Standard output is empty