Scala

Scala

Made by DeepSource

Consider making case objects final SC-W1067

Bug risk
Major

Any entity marked as case in Scala has certain implementations such as toString automatically filled. To avoid un-intended side-effects such as inheritance and to address the inconsistent behavior of entities not being tagged as final (between different Scala versions), it is recommended that you make case objects final.

Bad practice

class C {
  case object inner
}

Recommended

class C {
  final case object inner
}

Reference