Open
Description
If you publish this code with Scala 2.12.8:
class Foo(val value: String) extends AnyVal
case class Bar(foo: Foo)
And then change the Scala version to 2.12.9 (or 10) and run sbt mimaReportBinaryIssues
, you'll get these errors:
[error] * method unapply(Bar)scala.Option in object Bar has a different signature in current version, where it is (LBar;)Lscala/Option<LFoo;>; rather than (LBar;)Lscala/Option<Ljava/lang/String;>;
[error] filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("Bar.unapply")
[error] * static method unapply(Bar)scala.Option in class Bar has a different signature in current version, where it is (LBar;)Lscala/Option<LFoo;>; rather than (LBar;)Lscala/Option<Ljava/lang/String;>;
[error] filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("Bar.unapply")
[error] * static method andThen(scala.Function1)scala.Function1 in class Bar has a different signature in current version, where it is <A:Ljava/lang/Object;>(Lscala/Function1<LBar;TA;>;)Lscala/Function1<LFoo;TA;>; rather than <A:Ljava/lang/Object;>(Lscala/Function1<LBar;TA;>;)Lscala/Function1<Ljava/lang/String;TA;>;
[error] filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("Bar.andThen")
[error] * static method compose(scala.Function1)scala.Function1 in class Bar has a different signature in current version, where it is <A:Ljava/lang/Object;>(Lscala/Function1<TA;LFoo;>;)Lscala/Function1<TA;LBar;>; rather than <A:Ljava/lang/Object;>(Lscala/Function1<TA;Ljava/lang/String;>;)Lscala/Function1<TA;LBar;>;
[error] filter with: ProblemFilters.exclude[IncompatibleSignatureProblem]("Bar.compose")
[error] java.lang.RuntimeException: unapply_test: Binary compatibility check failed!
The issue seems to be the value class in the synthetic method signatures.