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

Compiler internal error if inside an optimized foreach loop and the body contains a try/catch block

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.4.2
    • 2.4.3
    • Static compilation
    • None

    Description

      The following code will trigger a compiler error, because of the try{} block used inside a statically compiled, optimized foreach loop:

      @CompileStatc
      private void foo(String[] arr) {
         for (String s in arr) {
            try {
               println(s)
            } catch (e) {}
         }
      }
      
      

      Attachments

        Activity

          People

            melix Cédric Champeau
            melix Cédric Champeau
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: