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

@CompileStatic problem with methods returning array of Objects - Error msg: "Cannot return value of type [LSomeClass; on method returning type SomeClass[]"

    XMLWordPrintableJSON

Details

    Description

      Using @CompileStatic in Grails grails.util.PluginBuildSettings class causes this kind of compilation errors:

      [Static type checking] - Cannot return value of type [Lorg.codehaus.groovy.grails.io.support.Resource; on method returning type org.codehaus.groovy.grails.io.support.Resource[]
      

      I've tried to isolate the problem, but I didn't succeed. I pushed a branch that has the compile error in it.

      reproducing problem:

      git clone -b cs-bug-arrays https://github.com/grails/grails-core.git
      cd grails-core
      // git fetch && git checkout cs-bug-arrays
      ./gradlew install -PskipTests -x signArchives -x docs -x javadoc -x gdoc -x groovydoc -x javadocJar -x sourcesJar
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: