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

Using defaults=false and includeFields=true w/ @TupleConstructor errors over metaClass

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0-alpha-1
    • None
    • groovy-jdk
    • None

    Description

      When trying out the new defaults = false feature of @TupleConstructor in conjunction with includeFields = true, I get a compiler error of:

      Groovyc: Error during @TupleConstructor processing, default value processing disabled but default value found for 'metaClass'

      Seems that includeFields = true ropes in the metaClass field, and so to work around it I have to add excludes = ['metaClass'] to the annotation.

      Is this intended behaviour? The example in the JavaDocs doesn't make mention of any metaClass or other Groovy internals, just declared fields.
      http://docs.groovy-lang.org/docs/groovy-2.5.0-alpha-1/html/api/groovy/transform/TupleConstructor.html

      Attachments

        Activity

          People

            emilles Eric Milles
            ultraq Emanuel Rabina
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: