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

[NPE] Creating a range in an inner class using @CompileStatic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-rc-2
    • 2.0-rc-3
    • Compiler
    • None

    Description

      The following code causes an NPE during compilation, with 2.0.0-rc-2:

      class Outer {
                      static class Inner {
                          @groovy.transform.CompileStatic
                          int m() {
                              int x = 0
                              for (int i in 1..10) {x++}
                              x
                          }
                      }
                  }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: