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

Nested closure with the same parameter name generates bad bytecodes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-3
    • 1.0-beta-4
    • class generator
    • None

    Description

      f= new Factory()

      c = f.getElementClosure('x')
      c(0)

      class Factory {
      Closure getElementClosure(tag) {
      {body |
      return {body |
      if (body instanceof Closure)

      { body = null }

      }
      }
      }
      }

      Throws a VerifyError

      Attachments

        Activity

          People

            jstrachan James Strachan
            tug John Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: