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

Java stub generation incorrect for static properties of traits

    XMLWordPrintableJSON

Details

    Description

      Groovy generates incorrect stubs for static properties of traits resulting in compilation errors such as:

      /Users/graemerocher/grails/apps/domain-plugins/app/build/tmp/compileGroovy/groovy-java-stubs/bug/DomainA.java:10: error: org_grails_datastore_mapping_dirty_checking_DirtyCheckable__DIRTY_CLASS_MARKER$get() in DomainParent cannot implement org_grails_datastore_mapping_dirty_checking_DirtyCheckable__DIRTY_CLASS_MARKER$get() in DirtyCheckable$Trait$FieldHelper
      public class DomainA
             ^
        overriding method is static
      1 error
      startup failed:
      Compilation failed; see the compiler error output for details.
      
      1 error
      

      Attached is an example. Simply run `./gradlew compileGroovy`

      Attachments

        1. domain-plugins.zip
          559 kB
          Graeme Rocher

        Issue Links

          Activity

            People

              paulk Paul King
              graemerocher1 Graeme Rocher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: