groovy
  1. groovy
  2. GROOVY-4994

wrong delegate for ComposedClosure

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.2, 1.9-beta-3
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      def a = { println foo }
      def b = { println bar }
      
      class O {
          def foo = 'foo'
          def bar = 'bar'
      }
      
      def ab = a >> b
      ab.delegate = new O()
      ab()
      

      throws groovy.lang.MissingPropertyException: No such property: foo for class: ConsoleScript5

        Activity

        Hide
        blackdrag blackdrag added a comment -

        fixed in a7b4af5d58be26a0dbabe7dac941a7c26470438c

        Show
        blackdrag blackdrag added a comment - fixed in a7b4af5d58be26a0dbabe7dac941a7c26470438c
        blackdrag blackdrag made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Jochen Theodorou [ blackdrag ]
        Fix Version/s 1.8.2 [ 17495 ]
        Fix Version/s 1.9-beta-2 [ 17494 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            blackdrag blackdrag
            Reporter:
            blackdrag blackdrag
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: