Inferred Type Containing Any Warnings When Wartremover Is Added

Viewed 359

I have a type like this:

sealed trait A extends Product with Serializable

object A{
  case object B extends A
  case object C extends A

  implicit val format: OFormat[A] = derived.oformat()
}

I am using play-json-derived-codecs to serialise the above type. It works fine but when I added scala wartremover library to my project, it throws this error which I do not know how to fix:

   [wartremover: Any] Inferred type containing Any: julienrf.json.derived.DerivedReads[A]

Do I need to add some type annotation somewhere to get around this or is my only choice to suppress this wart signal?

0 Answers
Related