groovy
  1. groovy
  2. GROOVY-1770

use(category){closure} should propagate the value returned by its closure

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1-beta-1
    • Component/s: None
    • Labels:
      None
    • Testcase included:
      yes
    • Number of attachments :
      1

      Description

      The use(category)

      {closure}

      construct doesn't seem to be returning any useful value. It would be useful if it propagated the value returned by its closure. This would a more natural "use" of categories in cases like:

      def function() {
      return use(HelperFunctions)

      { if (checkSomething) return EARLY //... return LATE }

      }

        Issue Links

          Activity

          Hide
          Paul King added a comment -

          Should work in HEAD.

          Show
          Paul King added a comment - Should work in HEAD.

            People

            • Assignee:
              Paul King
              Reporter:
              Ben Smith
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: