Aladdin - Scala Bugtracking
[#170] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Michel Martin fixed 2003-10-01 13:50:22.0
subject Super can call abstract methods
code
trait J {
  def foo(): Unit;
}

trait I with J {
  override def foo(): Unit = ();
}

class D extends J with I {
  override def foo(): Unit = super.foo();
}

object Test with Executable {
  (new D).foo();
}
what happened
The type-checker didn't complain on this program, even though class D  calls J.foo whi\
ch is an abstract method. Therefore, this program crashes at run-time.
what expected An error from the type-checker stating that class D needs to be abstract.
[back to overview]
Changes of this bug report
Michel  edited on  2003-10-01 13:50:47.0
Martin  edited on  2003-10-08 20:34:01.0
The spec was changed so that now you need to mark methods overriding abstract super references with both `abstract' and `override'.