Currently annotating a type with @typeclass generates members that don't have explicit return types. This conflicts with the Wart.PublicInference WartRemover rule.
You can see this issue with the simulacrum library by making adding this wart to build.sbt (see diff below). This results in a bunch of errors similar to the following:
src/test/scala/simulacrum/examples/examples.scala:13:8: [wartremover:PublicInference] Public member must have an explicit type ascription
[error] @typeclass trait Semigroup[A] {
[error] ^
diff --git a/build.sbt b/build.sbt
index 7f9479d..2e50f40 100644
--- a/build.sbt
+++ b/build.sbt
@@ -85,7 +85,8 @@ lazy val commonSettings = Seq(
useGpgAgent := true,
wartremoverErrors in (Test, compile) ++= Seq(
Wart.ExplicitImplicitTypes,
- Wart.ImplicitConversion)
+ Wart.ImplicitConversion,
+ Wart.PublicInference)
) ++ Seq(Compile, Test).map{ scope =>
scalacOptions in (scope, compile) := {
CrossVersion.partialVersion(scalaVersion.value) match {
Currently annotating a type with
@typeclassgenerates members that don't have explicit return types. This conflicts with theWart.PublicInferenceWartRemover rule.You can see this issue with the simulacrum library by making adding this wart to
build.sbt(see diff below). This results in a bunch of errors similar to the following: