Aladdin - Scala Bugtracking
[#745] project: specification priority: low category: missing feature
submitter assigned to status date submitted
Sean Martin won't fix 2006-09-20 11:58:40.0
subject Ambiguous concrete implementations not rejected.
code
trait A {
  def foo : Int;
}
trait B {
  override def foo = 10;
}
trait C {
  override def foo = 20;
}
class D extends B with C;
what happened
Code compiles without error, D silently gets C's implementation of foo.
what expected Should be rejected by the type checker, can be fixed by abstract override in either B or C (not both), but the user must specify this.
[back to overview]
Changes of this bug report
Martin  edited on  2006-09-20 16:29:25.0
Currently it's speced that way. We can discuss it in a Scala meeting, however.
Martin  edited on  2006-12-06 15:43:05.0
Thinking about it, I believe that changing this would be fundamentally incompatible with the spec as it is. So I close the bug.