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

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.1-beta-1
    • None
    • 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

        1. TestPropogatingUse.groovy
          0.9 kB
          Ben Smith

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: