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

NPE in compilation of spread-operator with @CompileStatic

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.3.6
    • 2.3.7
    • Compiler
    • None
    • java version "1.8.0_11"

    Description

      If I try to compile the following class the process fails with the attached stacktrace:

      @groovy.transform.CompileStatic
      class A {
          def method() {
              Object.methods.collect { java.lang.reflect.Method m -> m.name }
              Object.methods*.name
          }
      }
      

      Without the spread-operator line it will be compiled without an exception.

      Attachments

        1. A.groovy
          0.2 kB
          Florian Freudenberg
        2. stacktrace.log
          5 kB
          Florian Freudenberg

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: