Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8046

ClassFormatError void field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.7
    • 2.5.0-alpha-1
    • Compiler
    • jdk1.8.0_102

    Description

      class MyClass {
        void field
        static void main(String[] args) {}
      }
      

      When run:

      Exception in thread "main" java.lang.ClassFormatError: Field "field" in class MyClass has illegal signature "V"
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
      	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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Class.java:264)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:119)
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              daniilo Daniil Ovchinnikov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: