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

Groovy compiler generates invalid Java stubs

    XMLWordPrintableJSON

Details

    Description

      Steps to reproduce:

      > Task :test-kit:compileIntegTestGroovy FAILED
      Executing Spock 2.0.0-groovy-3.0 with NOT compatible Groovy version 4.0.0-beta-1 due to set spock.iKnowWhatImDoing.disableGroovyVersionCheck system property. This is unsupported and may result in weird runtime errors!
      /Users/lptr/Workspace/gradle/gradle/subprojects/test-kit/build/tmp/compileIntegTestGroovy/groovy-java-stubs/org/gradle/testkit/runner/BaseGradleRunnerIntegrationTest.java:92: error: '.class' expected
      protected final boolean debug = new java.lang.Boolean((boolean -> boolean)false);
                                                                     ^
      /Users/lptr/Workspace/gradle/gradle/subprojects/test-kit/build/tmp/compileIntegTestGroovy/groovy-java-stubs/org/gradle/testkit/runner/BaseGradleRunnerIntegrationTest.java:92: error: <identifier> expected
      protected final boolean debug = new java.lang.Boolean((boolean -> boolean)false);
                                                                               ^
      /Users/lptr/Workspace/gradle/gradle/subprojects/test-kit/build/tmp/compileIntegTestGroovy/groovy-java-stubs/org/gradle/testkit/runner/BaseGradleRunnerIntegrationTest.java:92: error: unexpected type
      protected final boolean debug = new java.lang.Boolean((boolean -> boolean)false);
                                                             ^
        required: value
        found:    class
      3 errors
      startup failed:
      Compilation failed; see the compiler error output for details.
      
      1 error
      

      See the attached BaseGradleRunnerIntegrationTest.java for the generated stubs.

      Attachments

        1. BaseGradleRunnerIntegrationTest.java
          9 kB
          Lóránt Pintér

        Activity

          People

            emilles Eric Milles
            lptr Lóránt Pintér
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: