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

[Java 10] Illegal method name with special chars

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.4.15
    • Fix Version/s: None
    • Component/s: class generator
    • Labels:
      None
    • Environment:
      java version "10.0.1" 2018-04-17
      Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
      Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

      Description

      I'm running this code on java 8 and java 10. While this code compiles and runs fine on java 8, it fails on java 10 with an error

      Error: LinkageError occurred while loading main class Foo
      	java.lang.ClassFormatError: Illegal method name "foo/bar" in class Foo
      
      class Foo {
      
        void "foo/bar"() {
          println "foo"
        }
      
        public static void main(String[] args) {
          new Foo()."foo/bar"()
        }
      }
      

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ketanpadegaonkar@gmail.com Ketan Padegaonkar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: