groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-7522) TupleConstructor overwrites empty default constructors
Date Thu, 06 Aug 2015 03:14:04 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-7522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14659400#comment-14659400
] 

Paul King commented on GROOVY-7522:
-----------------------------------

Since this is a breaking change - only for the very specific edge case of an explicit empty
includes - I am leaving in just the 2.5 stream.

> TupleConstructor overwrites empty default constructors
> ------------------------------------------------------
>
>                 Key: GROOVY-7522
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7522
>             Project: Groovy
>          Issue Type: Bug
>            Reporter: Keegan Witt
>            Assignee: Paul King
>              Labels: breaking_change
>             Fix For: 2.5.0-beta-1
>
>
> {{@TupleConstructor}} should not overwrite existing empty default constructors.  For
example, this should work, but doesn't currently
> {code:java}
> assert new Cat("Mr. Bigglesworth").name == null  // fails
> @groovy.transform.TupleConstructor
> class Cat {
>   String name
>   int age
>   Cat(String name) {}
> }
> {code}
> Granted, this is an edge case.  But unexpected behavior, nonetheless.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message