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

wrong delegate for ComposedClosure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8.2, 1.9-beta-3
    • None
    • None

    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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: