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

Groovy 3 Compilation Failure with method with argument Class<?> called with Class<D>

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 4.0.0-alpha-1, 3.0.6
    • Component/s: Compiler
    • Labels:
      None

      Description

      While upgrading GORM to Groovy 3 we are seeing compilation error as:

      > Task :grails-datastore-gorm:compileGroovy
      startup failed:
      /Users/pbehl/Projects/grails-data-mapping/grails-datastore-gorm/src/main/groovy/org/grails/datastore/gorm/GormStaticApi.groovy: 593: [Static type checking] - Cannot call org.grails.datastore.gorm.finders.DynamicFinder#populateArgumentsForCriteria(java.lang.Class <?>, org.grails.datastore.mapping.query.Query, java.util.Map <K extends java.lang.Object, V extends java.lang.Object>) with arguments [java.lang.Class <D>, org.grails.datastore.mapping.query.Query, java.util.Map] 
       @ line 593, column 13.
                     DynamicFinder.populateArgumentsForCriteria(persistentClass, q, params)
                     ^
      /Users/pbehl/Projects/grails-data-mapping/grails-datastore-gorm/src/main/groovy/org/grails/datastore/gorm/GormStaticApi.groovy: 758: [Static type checking] - Cannot call org.grails.datastore.gorm.finders.DynamicFinder#populateArgumentsForCriteria(java.lang.Class <?>, org.grails.datastore.mapping.query.Query, java.util.Map <K extends java.lang.Object, V extends java.lang.Object>) with arguments [java.lang.Class <D>, org.grails.datastore.mapping.query.Query, java.util.Map] 
       @ line 758, column 13.
                     DynamicFinder.populateArgumentsForCriteria persistentClass, q, args
                     ^
      /Users/pbehl/Projects/grails-data-mapping/grails-datastore-gorm/src/main/groovy/org/grails/datastore/gorm/GormStaticApi.groovy: 815: [Static type checking] - Cannot call org.grails.datastore.gorm.finders.DynamicFinder#populateArgumentsForCriteria(java.lang.Class <?>, org.grails.datastore.mapping.query.Query, java.util.Map <K extends java.lang.Object, V extends java.lang.Object>) with arguments [java.lang.Class <D>, org.grails.datastore.mapping.query.Query, java.util.Map] 
       @ line 815, column 13.
                     DynamicFinder.populateArgumentsForCriteria persistentClass, q, args
                     ^
      3 errors
      > Task :grails-datastore-gorm:compileGroovy FAILED
      

      Please check out and execute "./gradlew cTG"  in the following:
      https://github.com/grails/grails-data-mapping/tree/groovyStaticTypeCheckingError

        Attachments

        1. screenshot-1.png
          56 kB
          Eric Milles

          Activity

            People

            • Assignee:
              emilles Eric Milles
              Reporter:
              behlp Puneet Behl
            • 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 - 20m
                20m