-
Notifications
You must be signed in to change notification settings - Fork 407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation errors with Scala 1.12.0-M4 #230
Comments
Ouch. The 2.12.x community build has scalacheck pinned at 1.11.6: https://github.com/scala/community-builds/blame/2.12.x/common.conf#L66 |
def apply[T](implicit ev: Cogen[T]): Cogen[T] = ev
def apply[T](f: (Seed, T) => Seed): Cogen[T] = |
similar discussion? scala/scala#4971 (comment) |
attn @adriaanm, here's another example of overloading trouble involving SAM support |
That's a fun one! The smallest source-compatible hack I can think of is Sadly, I don't see how we can improve overload resolution to fix this without pushing it over the complexity brink that it's teetering. |
@adriaanm So ScalaCheck follows its tradition of torturing scalac... The workaround works, but I guess I must either bump the ScalaCheck version or create a separate branch for M4. |
You can make it both source-compatible and binary compatible like this: // binary compatible
protected[enclosingpackage] def apply[T](ev: Cogen[T]): Cogen[T] = ev
// source compatible
def apply[T](implicit ev: Cogen[T], dummy: DummyImplicit): Cogen[T] = ev |
I've implemented the workaround so master now builds with Scala 2.12.0-M4. I've also released a new version of ScalaCheck (1.13.1, both JVM and JS versions), built with Scala 2.10, 2.11 and 2.12-M4. |
Compiling ScalaCheck 1.13.0 with Scala 1.12.0-M4 results in a lot of errors like these:
These errors are introduced by M4, compilation with M3 works fine. Additionally, M4 works fine with ScalaCheck 1.11 and 1.12.
The text was updated successfully, but these errors were encountered: