Skip to content
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

ClassFormatError: Duplicate field name&signature in class file gen #221

Open
valtih1978 opened this issue Jun 8, 2015 · 0 comments
Open

Comments

@valtih1978
Copy link

object generator {

// i = Leaf() below if new object is commented out and ClassFormatError otherwise
new Object {}                             //> res0: Object = generator$$anonfun$main$1$$anon$1@f9d4f7



trait Tree {
    def and = Leaf() // this can also be commented to remove the error
}

case class Leaf() extends Tree

val i = Leaf()                            //> java.lang.ClassFormatError: Duplicate field name&signature in class file gen
                                              //| erator$$anonfun$main$1$Leaf$2
                                              //|   at java.lang.ClassLoader.defineClass1(Native Method)
                                              //|   at java.lang.ClassLoader.defineClass(Unknown Source)
                                              //|   at java.security.SecureClassLoader.defineClass(Unknown Source)
                                              //|   at java.net.URLClassLoader.defineClass(Unknown Source)
                                              //|   at java.net.URLClassLoader.access$100(Unknown Source)
                                              //|   at java.net.URLClassLoader$1.run(Unknown Source)
                                              //|   at java.net.URLClassLoader$1.run(Unknown Source)
                                              //|   at java.security.AccessController.doPrivileged(Native Method)
                                              //|   at java.net.URLClassLoader.findClass(Unknown Source)
                                              //|   at java.lang.ClassLoader.loadClass(Unknown Source)
                                              //|   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
                                              //|   at java.lang.ClassLoader.loadClass(Unknown Source)
                                              //|   at generator$$anonfun$main$1$Leaf$3$.apply(generator.scala:12)
                                              //|   at generator$$anonfun$main$1.apply$mcV$sp(generator.scala:14)
                                              //|   at org.scalaide
                                              //| Output exceeds cutoff limit.

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant