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

Anonymous inner class count is not local to enclosing type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-beta-3
    • None
    • None

    Description

      Consider the following:

      class C {
        def meth() {
          new Object() {} // C$1
          new Object() {} // C$2
          new Object() {  // C$3
            String toString() {
              new Object() {} // C$3$4 but expect C$3$1
            }
          }
          // new Object() {} here would be C$5 but expect C$4
        }
      }
      println new C().meth()
      

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              emilles Eric Milles
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m