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

Allow customisation of closure variable resolving strategy

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.1-beta-2
    • 1.1-beta-3
    • groovy-jdk
    • None

    Description

      It just needs something like

      def c = {}
      c.resolveStrategy = Closure.DELEGATE_FIRST
      or
      c.resolveStrategy = Closure.DELEGATE_ONLY
      or
      c.resolveStrategy = Closure.OWNER_FIRST

      c.delegate = foo
      c.call()

      Attachments

        Activity

          People

            graemerocher Graeme Rocher
            graemerocher Graeme Rocher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: