[
https://issues.apache.org/jira/browse/GROOVY-12509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131963#comment-18131963
]
ASF GitHub Bot commented on GROOVY-12509:
-----------------------------------------
codecov-commenter commented on PR #3044:
URL: https://github.com/apache/groovy/pull/3044#issuecomment-6404142955
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3044?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 `83.79630%` with `35 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 72.5580%. Comparing base
([`ccf5519`](https://app.codecov.io/gh/apache/groovy/commit/ccf551900026e937ae937cc1b748c7333873c82d?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`ba3c68d`](https://app.codecov.io/gh/apache/groovy/commit/ba3c68db722a07e162d165814a2e3d45a4907fda?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 5 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3044?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...ovy/classgen/asm/sc/StaticTypesCallSiteWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesCallSiteWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc0NhbGxTaXRlV3JpdGVyLmphdmE=)
| 70.5882% | [8 Missing and 7 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?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/3044?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)
| 90.2778% | [0 Missing and 7 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...va/org/codehaus/groovy/control/ResolveVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FResolveVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvUmVzb2x2ZVZpc2l0b3IuamF2YQ==)
| 72.2222% | [0 Missing and 5 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
| 84.6154% | [0 Missing and 2 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...sc/StaticTypesMethodReferenceExpressionWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesMethodReferenceExpressionWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc01ldGhvZFJlZmVyZW5jZUV4cHJlc3Npb25Xcml0ZXIuamF2YQ==)
| 81.8182% | [0 Missing and 2 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...groovy/classgen/asm/sc/StaticInvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticInvocationWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNJbnZvY2F0aW9uV3JpdGVyLmphdmE=)
| 93.7500% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...taticTypesBinaryExpressionMultiTypeDispatcher.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesBinaryExpressionMultiTypeDispatcher.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc0JpbmFyeUV4cHJlc3Npb25NdWx0aVR5cGVEaXNwYXRjaGVyLmphdmE=)
| 50.0000% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...m/sc/transformers/BinaryExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3044?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=)
| 83.3333% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...roovy/transform/stc/StaticTypeCheckingSupport.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingSupport.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nU3VwcG9ydC5qYXZh)
| 75.0000% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3044?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/3044?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3044 +/- ##
==================================================
+ Coverage 72.5358% 72.5580% +0.0222%
- Complexity 40785 40928 +143
==================================================
Files 1644 1644
Lines 143128 143313 +185
Branches 26931 27004 +73
==================================================
+ Hits 103819 103985 +166
- Misses 29748 29756 +8
- Partials 9561 9572 +11
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3044?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...rg/codehaus/groovy/classgen/AsmClassGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FAsmClassGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL0FzbUNsYXNzR2VuZXJhdG9yLmphdmE=)
| `85.6618% <100.0000%> (+0.0317%)` | :arrow_up: |
|
[...vy/classgen/asm/sc/StaticCompilationMopWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticCompilationMopWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNDb21waWxhdGlvbk1vcFdyaXRlci5qYXZh)
| `100.0000% <100.0000%> (ø)` | |
|
[.../transformers/MethodCallExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FMethodCallExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvTWV0aG9kQ2FsbEV4cHJlc3Npb25UcmFuc2Zvcm1lci5qYXZh)
| `89.1892% <100.0000%> (-1.2870%)` | :arrow_down: |
|
[...sc/transformers/PropertyExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FPropertyExpressionTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvUHJvcGVydHlFeHByZXNzaW9uVHJhbnNmb3JtZXIuamF2YQ==)
| `100.0000% <100.0000%> (ø)` | |
|
[...groovy/classgen/asm/sc/StaticInvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticInvocationWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNJbnZvY2F0aW9uV3JpdGVyLmphdmE=)
| `74.1463% <93.7500%> (+0.5282%)` | :arrow_up: |
|
[...taticTypesBinaryExpressionMultiTypeDispatcher.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesBinaryExpressionMultiTypeDispatcher.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc0JpbmFyeUV4cHJlc3Npb25NdWx0aVR5cGVEaXNwYXRjaGVyLmphdmE=)
| `86.4198% <50.0000%> (+0.0843%)` | :arrow_up: |
|
[...m/sc/transformers/BinaryExpressionTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3044?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=)
| `91.9847% <83.3333%> (-0.2028%)` | :arrow_down: |
|
[...roovy/transform/stc/StaticTypeCheckingSupport.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingSupport.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nU3VwcG9ydC5qYXZh)
| `81.8104% <75.0000%> (-0.0389%)` | :arrow_down: |
|
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Fgroovy%2Flang%2FMetaClassImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9ncm9vdnkvbGFuZy9NZXRhQ2xhc3NJbXBsLmphdmE=)
| `79.1111% <84.6154%> (+0.0166%)` | :arrow_up: |
|
[...sc/StaticTypesMethodReferenceExpressionWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2Fsc%2FStaticTypesMethodReferenceExpressionWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9zYy9TdGF0aWNUeXBlc01ldGhvZFJlZmVyZW5jZUV4cHJlc3Npb25Xcml0ZXIuamF2YQ==)
| `89.8876% <81.8182%> (+0.5505%)` | :arrow_up: |
| ... and [3
more](https://app.codecov.io/gh/apache/groovy/pull/3044?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| |
... and [14 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3044/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>
> STC: private members of another class of the same nest are not accessible
> -------------------------------------------------------------------------
>
> Key: GROOVY-12509
> URL: https://issues.apache.org/jira/browse/GROOVY-12509
> Project: Groovy
> Issue Type: Bug
> Components: Static Type Checker
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> Under static type checking, a class nested in a top-level class cannot use
> the private constructors, methods and accessors of another class nested in
> the same top-level class:
> {code:groovy}
> @groovy.transform.CompileStatic
> class C {
> static class Box {
> private Box(String s) {}
> private static String sm() { 'sm' }
> private String im() { 'im' }
> private String getX() { 'x' }
> }
> static class A { private static class Hidden { public static int x = 1 } }
> static class Other {
> static test(Box box) {
> new Box('a') // Cannot find matching constructor
> C$Box(java.lang.String)
> Box.sm() // Cannot find matching method java.lang.Class#sm()
> or static method C$Box#sm()
> box.im() // Cannot find matching method C$Box#im()
> box.x // No such property: x for class: C$Box
> A.Hidden.x // Cannot access field: x of class: C$A$Hidden from
> class: C$Other
> }
> }
> }
> {code}
> Java allows all of these (JLS 6.6.1: a private member is accessible anywhere
> within the body of the top-level class that encloses its declaration), and
> the JVM does through nestmates. Groovy already writes the {{NestHost}} and
> {{NestMembers}} attributes for these classes, the class generator already
> calls private members of nestmates directly, and the type checker already
> allows private fields of nestmates (GROOVY-12290). Method references such as
> {{Box::new}} and {{Box::sm}} are rejected the same way.
> The modes also disagree. With a private {{Box(String)}} beside a public
> {{Box(Object)}}, {{new Box('s')}} in {{Other}} calls the private constructor
> in dynamic and {{@TypeChecked}} code, as javac does, but the public one under
> {{@CompileStatic}}. The same happens for a private {{B.m(String)}} beside an
> inherited {{A.m(Object)}}.
> A private getter or setter used through property syntax ({{box.x}}) is also
> rejected from the outer class into a nested class.
> The last case, a public member reached through a private nested type
> ({{A.Hidden.x}}, or a constant of a private nested enum), worked in 5.0.8 and
> fails since 6.0.0 (GROOVY-12310), from a sibling and from the outer class.
> The other cases fail in 4.0, 5.0 and 6.0.
> PR: https://github.com/apache/groovy/pull/3044
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)