package object stuff {
@newtype case class Thing(underlying: Int)
}
In scala 2.12.x the following warning is issued (making -Xfatal-warning impossible):
[warn] package.scala:10: it is not recommended to define classes/objects inside of package objects.
[warn] If possible, define trait MetricActorRef__Types in package metrics instead.
[warn] @newtype case class MetricActorRef(underlying: ActorRef)
[warn] ^
This warning happens if I use any scala-newtype version > 0.2.1 (that's the last version that works without the warning).
I am able to work around the issue by using https://github.com/ghik/silencer with the pathFilters pointing to the file in question (the @silent annotation does not work).
I have the following code:
In scala 2.12.x the following warning is issued (making -Xfatal-warning impossible):
This warning happens if I use any scala-newtype version >
0.2.1
(that's the last version that works without the warning).I am able to work around the issue by using https://github.com/ghik/silencer with the pathFilters pointing to the file in question (the @silent annotation does not work).