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

Closure-shared variables may produce different closure classes for same sources

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.11
    • Component/s: None
    • Labels:
      None

      Description

      For the following source code:

      def xx = true
                          def moot = "bar"
                          def kr = [:]
                          def zorg = []
                          def cl = {
                              def (x,y,z,t) = [xx, moot, kr , zorg]
                          }
      

      The compiler may generate different bytecode depending on iterations. The bytecode produced is always valid, but not reproducible.

        Attachments

          Activity

            People

            • Assignee:
              melix Cédric Champeau
              Reporter:
              melix Cédric Champeau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: