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

Can't set the delagate on a curried closure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0
    • 1.1-beta-1
    • None
    • None

    Description

      def c =

      {a -> println z}

      def cc = c.curry(1)

      cc.delegate = [z: "goodbye"]
      cc()

      throws
      Caught: groovy.lang.MissingPropertyException: No such property: z for class: test
      groovy.lang.MissingPropertyException: No such property: z for class: test
      at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:888)
      at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:2077)
      at groovy.lang.GroovyObjectSupport.getProperty(GroovyObjectSupport.java:65)
      at groovy.lang.Script.getProperty(Script.java:85)

      Attachments

        Issue Links

          Activity

            People

              blackdrag Jochen Theodorou
              tug John Wilson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: