Groovy
  1. Groovy
  2. GROOVY-5040

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2
    • Fix Version/s: 1.8.3, 1.9-beta-4, 1.7.11
    • Component/s: Compiler
    • Labels:
      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) {}
      

        Activity

        Show
        Peter Niederwieser added a comment - - edited Also see http://groovy.329449.n5.nabble.com/Annotation-closure-not-behaving-as-expected-td4821286.html
        Hide
        Jochen Theodorou added a comment -

        fixed

        Show
        Jochen Theodorou added a comment - fixed

          People

          • Assignee:
            Jochen Theodorou
            Reporter:
            Peter Niederwieser
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development