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

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

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1-beta-1
    • Component/s: None
    • Labels:
      None

      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 }

      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: