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

duplicate class definition bei "interface x extends y"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.1
    • 1.6.2, 1.7-beta-1
    • class generator
    • None
    • Windows XP Professional SP3

    Description

      To reproduce:
      Define an interface A in File A.groovy:

      A.groovy:

      interface A {
      }

      In groovyConsole add Folder containing A.groovy to class path and define an interface B:

      interface B extends A {
      }
      println("Hello World");

      Trying to run the script the first time results in the error message:
      Exception thrown: loader (instance of groovy/lang/GroovyClassLoader$InnerLoader): attempted duplicate class definition for name: "A"
      java.lang.LinkageError: loader (instance of groovy/lang/GroovyClassLoader$InnerLoader): attempted duplicate class definition for name: "A"

      Second time execution gives no error. You have to clear the script context to reproduce the error. It is also necessary to have A in a separate file.

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            cpickart Christoph Pickart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: