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

rcurry fails using with closures and default parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.6
    • 2.4.0-rc-1
    • groovy-jdk
    • None

    Description

      Next code fails (ArrayOutOfBoundException):

      def log = {String msg, arg0 = null, arg1 = null, String level ->
          println "Doing $level $msg $arg0 $arg1"
      }
      
      def trace = log.rcurry('TRACE')
      
      trace('Trace world')
      

      If I change parameters order (using "level" as first parameter) and use curry instead of rcurry this example works.

      Attachments

        Activity

          People

            Unassigned Unassigned
            guindous Sebastian Cardello
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: