Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-5989 Inner Class Issues
  3. GROOVY-7762

Static inner classes not visible to child classes

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.6, 2.2.0-beta-1, 2.1.7, 2.2.0, 2.4.0-beta-3
    • Fix Version/s: None
    • Component/s: class generator
    • Labels:
      None

      Description

      If both the parent class and the child are in the same file or project (i.e. they are being compiled together), this works; however, if the parent is compiled into a separate JAR, the child class is unable to see the parents inner classes.

      Example:

      class X {
          static class Y {}
      }

      Compile X into a separate JAR.

      class Z extends X {
          Z() {
              Y y = new Y();
          }
      }

      Compiling Z will cause an error.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                nmccloud Kenneth Gendron
              • Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: