Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-2503 MOP 2.0 design inflluencing issues
  3. GROOVY-2686

Can't call a Closure in a Closure's Delegete

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.4
    • 4.0.0-beta-1
    • groovy-runtime
    • None

    Description

      def c =

      {foo()}

      c.delegate = [foo:

      {println "bar"}

      ]
      c()

      Gives a MissingMethodException when trying to call foo() in the closure

      Attachments

        Activity

          People

            emilles Eric Milles
            tug John Wilson
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: