docs/_docs/reference/error-codes/E060.md
This error is emitted when an abstract member is declared with a modifier that is incompatible with being abstract, such as final or private.
Abstract members are meant to be implemented by subclasses, so they cannot be final (which prevents overriding) or private (which prevents access by subclasses).
trait Example:
final def abstractMethod: Int
-- [E060] Syntax Error: example.scala:2:12 -------------------------------------
2 | final def abstractMethod: Int
| ^
| abstract method abstractMethod may not have `final` modifier
// Remove the incompatible modifier
trait Example:
def abstractMethod: Int
// Or provide an implementation if you want final
trait Example:
final def concreteMethod: Int = 42