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

Variables in annotation closures should never be bound to declarations in "enclosing" scopes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.2
    • 1.8.3, 1.9-beta-4, 1.7.11
    • Compiler
    • None

    Description

      For example, in the following code the closure variable is incorrectly bound to the method parameter, resulting in the absence of an (Object, Object) constructur and the presence of an (Object, Object, Reference) constructor for the closure:

      @Foo({ value })
      def doit(value) {}
      

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            pniederw Peter Niederwieser
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: