You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Keegan Witt (JIRA)" <ji...@apache.org> on 2015/07/24 03:35:04 UTC
[jira] [Comment Edited] (GROOVY-7523) TupleConstructor with empty
includes includes all
[ https://issues.apache.org/jira/browse/GROOVY-7523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14639795#comment-14639795 ]
Keegan Witt edited comment on GROOVY-7523 at 7/24/15 1:34 AM:
--------------------------------------------------------------
Actually, as I'm reading this more, it might be fairly involved to change (even if only we only changed {{TupleConstructorASTTransformation}} and not {{AbstractASTTransformation.shouldSkip()}}) because {{AbstractASTTransformation.tokenize()}} defaults to an empty list, there's no way to tell the difference between passing an empty list and not passing anything by just inspecting the {{includes}} list alone.
was (Author: keegan):
Actually, as I'm reading this more, it might be fairly involved to change because {{org.codehaus.groovy.transform.AbstractASTTransformation.tokenize()}} defaults to an empty list, there's no way to tell the difference between passing an empty list and not passing anything by just inspecting the {{includes}} list alone.
> TupleConstructor with empty includes includes all
> -------------------------------------------------
>
> Key: GROOVY-7523
> URL: https://issues.apache.org/jira/browse/GROOVY-7523
> Project: Groovy
> Issue Type: Bug
> Reporter: Keegan Witt
>
> I know this is a bit of an edge case, but I find the behavior doesn't follow what one would expect
> {code:java}
> assert Cat.class.declaredConstructors.size() == 1 // fails
> @groovy.transform.TupleConstructor(includes=[])
> class Cat {
> String name
> int age
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)