• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • groovy-plugin
    • None

      Code like:

      Boolean A = true
      Boolean B = true
      Boolean C = true
      
      A = B = C = false
      
      println( A )
      println( B )
      println ( C )
      

      gives following results when executed in jenkins
      null
      null
      false

      but in script console or if function is marked as @NonCPS
      false
      false
      false

      which is expected behavior.

          [JENKINS-62563] groovy variable multiassigment

          Mark Waite added a comment -

          This is a known condition from the Jenkins continuation passing style (CPS) that is used to assure the safety of the script code that is being executed. Refer to the groovy-cps plugin README for more details.

          Mark Waite added a comment - This is a known condition from the Jenkins continuation passing style (CPS) that is used to assure the safety of the script code that is being executed. Refer to the groovy-cps plugin README for more details.

            vjuranek vjuranek
            xjjx Pawel Xj
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: