title: Why can't a class extend traits with method of the same signature?
body: <p>Why do I get the error below? How to workaround it?</p>
  
  <p>I assumed that since A and B compile to (interface,class) pairs, it's a matter of choosing the right static method call to implement when compiling C. I would expect the priority to be according to order. </p>
  
  <pre><code>scala&gt; trait A { def hi = println("A") }
  defined trait A
  
  scala&gt; trait B { def hi = println("B") }
  defined trait B
  
  scala&gt; class C extends B with A
  &lt;console&gt;:6: error: error overriding method hi in trait B of type =&gt; Unit;
   method hi in trait A of type =&gt; Unit needs `override' modifier
         class C extends B with A
  
  scala&gt; trait A { override def hi = println("A") }
  &lt;console&gt;:4: error: method hi overrides nothing
         trait A {override def hi = println("A")}
  </code></pre>
  
  <p>Note that in Ruby this works well:</p>
  
  <pre class="lang-ruby prettyprint-override"><code>&gt;&gt; module B; def hi; puts 'B'; end; end
  =&gt; nil
  &gt;&gt; module A; def hi; puts 'A'; end; end
  =&gt; nil
  &gt;&gt; class C; include A; include B; end
  =&gt; C
  &gt;&gt; c = C.new
  =&gt; #&lt;C:0xb7c51068&gt;
  &gt;&gt; c.hi
  B
  =&gt; nil
  </code></pre>