[
https://issues.apache.org/jira/browse/GROOVY-12524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133610#comment-18133610
] ASF GitHub Bot commented on GROOVY-12524: ----------------------------------------- codecov-commenter commented on PR #3064: URL: https://github.com/apache/groovy/pull/3064#issuecomment-6472046684 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/3064?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report :x: Patch coverage is `57.27273%` with `47 lines` in your changes missing coverage. Please review. :white_check_mark: Project coverage is 73.5974%. Comparing base ([`cfd9b2f`](https://app.codecov.io/gh/apache/groovy/commit/cfd9b2f0222a8e1a74473f7c5b2cb45b5bdd3b5b?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`819c32d`](https://app.codecov.io/gh/apache/groovy/commit/819c32d229ff8c434b9aa69eacfebc7cd0dcaeaa?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)). :warning: Report is 2 commits behind head on master. | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/3064?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines | |---|---|---| | [...m/sc/transformers/BinaryExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3064?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FBinaryExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQmluYXJ5RXhwcmVzc2lvblRyYW5zZm9ybWVyLmphdmE=) | 53.5354% | [34 Missing and 12 partials :warning: ](https://app.codecov.io/gh/apache/groovy/pull/3064?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | | [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3064?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | 88.8889% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/groovy/pull/3064?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | <details><summary>Additional details and impacted files</summary> [](https://app.codecov.io/gh/apache/groovy/pull/3064?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #3064 +/- ## ================================================== - Coverage 73.6047% 73.5974% -0.0074% - Complexity 42348 42372 +24 ================================================== Files 1657 1657 Lines 145708 145815 +107 Branches 27498 27526 +28 ================================================== + Hits 107248 107316 +68 - Misses 28479 28510 +31 - Partials 9981 9989 +8 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/3064?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...vy/transform/sc/StaticCompilationMetadataKeys.java](https://app.codecov.io/gh/apache/groovy/pull/3064?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2FStaticCompilationMetadataKeys.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy9TdGF0aWNDb21waWxhdGlvbk1ldGFkYXRhS2V5cy5qYXZh) | `100.0000% <100.0000%> (ø)` | | | [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3064?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | `87.4682% <88.8889%> (-0.0028%)` | :arrow_down: | | [...m/sc/transformers/BinaryExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3064?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FBinaryExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQmluYXJ5RXhwcmVzc2lvblRyYW5zZm9ybWVyLmphdmE=) | `81.4084% <53.5354%> (-10.7790%)` | :arrow_down: | ... and [11 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/3064/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) </details> <details><summary> :rocket: New features to boost your workflow: </summary> - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems. - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges. </details> > SC: a compound assignment to a property defined by extension methods fails > with "Access to ... is forbidden" > ------------------------------------------------------------------------------------------------------------ > > Key: GROOVY-12524 > URL: https://issues.apache.org/jira/browse/GROOVY-12524 > Project: Groovy > Issue Type: Bug > Components: Static compilation > Affects Versions: 6.0.0 > Reporter: Scott Murphy Heiberg > Assignee: Daniel Sun > Priority: Major > > Under {{@CompileStatic}}, a compound assignment to a property whose accessors > are extension methods does not compile: > {code:groovy} > @groovy.transform.CompileStatic > class C { > String test(File file) { > file.text += 'b' // Access to java.io.File#text is forbidden > file.text > } > } > {code} > Reading {{file.text}} and assigning {{file.text = 'b'}} compile to direct > calls of the extension methods {{getText(File)}} and {{setText(File, > String)}}, and dynamic Groovy and {{@TypeChecked}} run the compound > assignment. The same error is reported for {{this.text += 'b'}} and {{text += > 'b'}} in a subclass of {{File}}. Seen in 4.0.33, 5.0.8, 6.0.0 and master. > Expected: the compound assignment compiles to calls of the extension methods, > like the read and the plain assignment. -- This message was sent by Atlassian Jira (v10.3.26#10030026)
