groovy
  1. groovy
  2. GROOVY-1634

Can't set the delagate on a curried closure

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1-beta-1
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      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)

        Issue Links

          Activity

          Hide
          blackdrag blackdrag added a comment -

          fixed

          Show
          blackdrag blackdrag added a comment - fixed

            People

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

              Dates

              • Created:
                Updated:
                Resolved: