You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Emanuel Rabina (JIRA)" <ji...@apache.org> on 2017/05/26 10:39:04 UTC

[jira] [Created] (GROOVY-8207) Using defaults=false and includeFields=true w/ @TupleConstructor errors over metaClass

Emanuel Rabina created GROOVY-8207:
--------------------------------------

             Summary: Using defaults=false and includeFields=true w/ @TupleConstructor errors over metaClass
                 Key: GROOVY-8207
                 URL: https://issues.apache.org/jira/browse/GROOVY-8207
             Project: Groovy
          Issue Type: Bug
          Components: groovy-jdk
    Affects Versions: 2.5.0-alpha-1
            Reporter: Emanuel Rabina


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




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)