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

Groovy 2.4.12 Static compiler fails on nonsense type inference error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.12
    • 2.5.8
    • Static Type Checker
    • None

    Description

      I am using Gradle which internally currently uses Groovy 2.4.12.

      I am getting the following error:

      martin@martin-desktop:~/devel/apollo/buildteam/gradle_plugins(master)$ ./gradlew clean test
      
      > Task :compileGroovy
      startup failed:
      /home/martin/devel/apollo/buildteam/gradle_plugins/src/main/groovy/apollosoft/build/support/gradle/assets/ApolloAssetsDSLExtension.groovy: 54: [Static type checking] - Cannot use diamond <> with anonymous inner classes
       @ line 54, column 28.
                 closure.delegate = new Object() {
                                    ^
      
      1 error
      

      It looks like it is wrong, I am not specifying any diamond operator anywhere.

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              skurla.martin@gmail.com Martin Skurla
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h