- https://issues.scala-lang.org/browse/SI-7288 ? or another issue?
Last active
March 30, 2016 01:22
-
-
Save xuwei-k/a5a9a3a77ab42fea1b89352e4404acc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scalaVersion := "2.11.8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example | |
case class Foo[F[_], A](step: F[Foo.Step[A]]) | |
object Foo { | |
class Step[A] | |
object Done { | |
def unapply[A](a: Step[A]): Boolean = true | |
} | |
} | |
object ClassFormatErrorBug { | |
implicit class AnyOps[A](actual: A) { | |
def mustMatch[B](f: PartialFunction[A, B]): Unit = { | |
} | |
} | |
type Id[+A] = A | |
def main(args: Array[String]): Unit = { | |
val s = new Foo[Id, String](new Foo.Step[String]) | |
s.step mustMatch { | |
case Foo.Done() => true | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[info] Running com.example.ClassFormatErrorBug | |
[error] (run-main-0) java.lang.ClassFormatError: Duplicate method name&signature in class file com/example/ClassFormatErrorBug$$anonfun$main$1 | |
java.lang.ClassFormatError: Duplicate method name&signature in class file com/example/ClassFormatErrorBug$$anonfun$main$1 | |
at java.lang.ClassLoader.defineClass1(Native Method) | |
at java.lang.ClassLoader.defineClass(ClassLoader.java:760) | |
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) | |
at java.net.URLClassLoader.defineClass(URLClassLoader.java:467) | |
at java.net.URLClassLoader.access$100(URLClassLoader.java:73) | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:368) | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:362) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:361) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) | |
at com.example.ClassFormatErrorBug$.main(Main.scala:23) | |
at com.example.ClassFormatErrorBug.main(Main.scala) | |
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) | |
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) | |
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) | |
at java.lang.reflect.Method.invoke(Method.java:498) | |
[trace] Stack trace suppressed: run last compile:run for the full output. | |
java.lang.RuntimeException: Nonzero exit code: 1 | |
at scala.sys.package$.error(package.scala:27) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment