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

Using spread operator on function with compile static results in two calls to function

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.4.6
    • Component/s: None
    • Labels:
      None

      Description

      Method heavyOperation() will be called twice. If we remove @CompileStatic, problem is solved.

          @CompileStatic
          List<String> invokeCompileStatic(Service service){
              service.heavyOperation()*.toString()
          }
      

      A test which confirms it, can be found in my Gist

        Attachments

          Activity

            People

            • Assignee:
              shils Shil Sinha
              Reporter:
              m.levvy@gmail.com MichaƂ Lewandowski
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: