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

ASF GitHub Bot commented on GROOVY-10925:
-----------------------------------------

codecov-commenter commented on PR #1854:
URL: https://github.com/apache/groovy/pull/1854#issuecomment-1417595522

   # 
[Codecov](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#1854](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (99d08c6) into 
[GROOVY_4_0_X](https://codecov.io/gh/apache/groovy/commit/3bfef497e2113001f2aaa9455aec01057b4ed2e8?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (3bfef49) will **decrease** coverage by `0.0089%`.
   > The diff coverage is `100.0000%`.
   
   [![Impacted file tree 
graph](https://codecov.io/gh/apache/groovy/pull/1854/graphs/tree.svg?width=650&height=150&src=pr&token=1r45138NfQ&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@                  Coverage Diff                   @@
   ##             GROOVY_4_0_X      #1854        +/-   ##
   ======================================================
   - Coverage         67.8204%   67.8115%   -0.0089%     
   + Complexity          28151      28145         -6     
   ======================================================
     Files                1425       1425                
     Lines              112388     112385         -3     
     Branches            19235      19233         -2     
   ======================================================
   - Hits                76222      76210        -12     
   - Misses              29657      29666         +9     
     Partials             6509       6509                
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...vy/transform/options/ImmutablePropertyHandler.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9ncm9vdnkvdHJhbnNmb3JtL29wdGlvbnMvSW1tdXRhYmxlUHJvcGVydHlIYW5kbGVyLmphdmE=)
 | `77.0270% <ø> (-4.3063%)` | :arrow_down: |
   | 
[...s/groovy/transform/ImmutableASTTransformation.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9JbW11dGFibGVBU1RUcmFuc2Zvcm1hdGlvbi5qYXZh)
 | `67.0157% <ø> (+0.3490%)` | :arrow_up: |
   | 
[...y/transform/TupleConstructorASTTransformation.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9UdXBsZUNvbnN0cnVjdG9yQVNUVHJhbnNmb3JtYXRpb24uamF2YQ==)
 | `85.5000% <100.0000%> (ø)` | |
   | 
[...in/java/groovy/lang/ReadOnlyPropertyException.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9SZWFkT25seVByb3BlcnR5RXhjZXB0aW9uLmphdmE=)
 | `50.0000% <0.0000%> (-50.0000%)` | :arrow_down: |
   | 
[...ovy/transform/MapConstructorASTTransformation.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9NYXBDb25zdHJ1Y3RvckFTVFRyYW5zZm9ybWF0aW9uLmphdmE=)
 | `80.9091% <0.0000%> (-0.9091%)` | :arrow_down: |
   | 
[...org/codehaus/groovy/vmplugin/v8/IndyInterface.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3ZtcGx1Z2luL3Y4L0luZHlJbnRlcmZhY2UuamF2YQ==)
 | `85.2459% <0.0000%> (-0.8197%)` | :arrow_down: |
   | 
[...va/org/codehaus/groovy/ast/tools/GeneralUtils.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC90b29scy9HZW5lcmFsVXRpbHMuamF2YQ==)
 | `83.5351% <0.0000%> (-0.4843%)` | :arrow_down: |
   | 
[...ncurrentlinkedhashmap/ConcurrentLinkedHashMap.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS91dGlsL2NvbmN1cnJlbnQvY29uY3VycmVudGxpbmtlZGhhc2htYXAvQ29uY3VycmVudExpbmtlZEhhc2hNYXAuamF2YQ==)
 | `44.8617% <0.0000%> (-0.1976%)` | :arrow_down: |
   | 
[...us/groovy/transform/AbstractASTTransformation.java](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9BYnN0cmFjdEFTVFRyYW5zZm9ybWF0aW9uLmphdmE=)
 | `76.6169% <0.0000%> (+0.4975%)` | :arrow_up: |
   | ... and [1 
more](https://codecov.io/gh/apache/groovy/pull/1854?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | |
   




> @TupleConstructor namedVariant breaks on setting private final fields in 
> constructor
> ------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10925
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10925
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 4.0.8
>            Reporter: Joe Li
>            Priority: Major
>
> @TupleConstructor `namedVariant` Breaks in Groovy4 when setting values to 
> private final fields in constructor
>  
> Example code in Groovy4 that throws the `Unrecognized namedArgKey: x` error:
> {code:java}
> import groovy.transform.*
> @TupleConstructor(includeFields = true, namedVariant = true)
> @ToString(includeNames = true, includeFields = true)
> class Foo {    
>   private final int x = 1   
>   private int y = 2    
>   private final int z
> }
> println new Foo(x:3, y: 3, z: 3) {code}
>  
>  
> After removing the `namedVariant` and add the `@MapConstructor` the code 
> works:
> {code:java}
> import groovy.transform.*
> @MapConstructor(includeFields = true)
> @TupleConstructor(includeFields = true)
> @ToString(includeNames = true, includeFields = true)
> class Foo {    
>   private final int x = 1   
>   private int y = 2    
>   private final int z
> }
> println new Foo(x:3, y: 3, z: 3) {code}
>  
>  
> Related issue: 
> [GROOVY-10919|https://issues.apache.org/jira/browse/GROOVY-10919], 
> @MapConstructor Breaks in Groovy4 when combined with @TupleConstructor, fine 
> in Groovy3



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to