Scala lets you override a method in two legal ways:

Given super class:

class A {
  def a = "A"
}

We can override the method "a" by:

class B extends A {
  override def a = "B"
}

and

class B extends A {
  override def a() = "B"
}

both seem to override the method "a" correctly. What is the design decision behind this? Why allow for "a()" in B to override "a" in A?

Edit
Report