Aladdin - Scala Bugtracking
[#83] project: compiler priority: medium category: feature
submitter assigned to status date submitted
Michel Martin won't fix 2003-08-08 11:08:39.0
subject it is possible to refer to abstract methods with "super"
code
trait A {
  def f: Int;
}

abstract class B extends A {
  override def f: Int = super.f;
}
what happened
No analyser error (but then AddInterfaces crashes)
what expected An error telling me that the reference to "super.f" in B is illegal, since it refers to an abstract method.
[back to overview]
Changes of this bug report
Michel  edited on  2003-08-08 11:13:47.0
According to Matthias, this is actually a feature, sorry for this incorrect report.
Martin  edited on  2003-08-08 12:13:43.0
No, this is legal behavior. It is possible to refer to an abstract method via super, *provided* the referring method is labelled override. There is another check that methods labelled override and overriding abstract methods in their super class can be used only in abstract classes.
Martin  edited on  2003-08-13 15:16:32.0