[
https://issues.apache.org/jira/browse/GROOVY-12717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140045#comment-18140045
]
ASF GitHub Bot commented on GROOVY-12717:
-----------------------------------------
codecov-commenter commented on PR #3251:
URL: https://github.com/apache/groovy/pull/3251#issuecomment-6700615615
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3251?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 `68.75000%` with `10 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.3994%. Comparing base
([`7a317c9`](https://app.codecov.io/gh/apache/groovy/commit/7a317c9eca012331421066955272e5016d0f4570?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`e59c416`](https://app.codecov.io/gh/apache/groovy/commit/e59c41650ac76ecea4d2c4b68cb13bb33ae0f46e?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 26 commits behind head on master.
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3251?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Patch % | Lines |
|---|---|---|
|
[...groovy/classgen/asm/sc/StaticInvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3251?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=)
| 33.3333% | [0 Missing and 4 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3251?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/3251?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==)
| 62.5000% | [0 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3251?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...rm/sc/transformers/ConstructorCallTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3251?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FConstructorCallTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQ29uc3RydWN0b3JDYWxsVHJhbnNmb3JtZXIuamF2YQ==)
| 83.3333% | [0 Missing and 3 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3251?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/3251?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3251 +/- ##
==================================================
+ Coverage 74.3385% 74.3994% +0.0609%
- Complexity 44310 44355 +45
==================================================
Files 1699 1699
Lines 150860 151016 +156
Branches 28755 28777 +22
==================================================
+ Hits 112147 112355 +208
+ Misses 28439 28380 -59
- Partials 10274 10281 +7
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3251?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...sc/StaticTypesMethodReferenceExpressionWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3251?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==)
| `88.2729% <62.5000%> (-0.2552%)` | :arrow_down: |
|
[...rm/sc/transformers/ConstructorCallTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3251?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fsc%2Ftransformers%2FConstructorCallTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zYy90cmFuc2Zvcm1lcnMvQ29uc3RydWN0b3JDYWxsVHJhbnNmb3JtZXIuamF2YQ==)
| `94.0298% <83.3333%> (-1.1702%)` | :arrow_down: |
|
[...groovy/classgen/asm/sc/StaticInvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/3251?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=)
| `77.3832% <33.3333%> (-0.1640%)` | :arrow_down: |
... and [34 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3251/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: new of a protected constructor of another package, or a protected method
> through a superclass receiver, fails verification instead of being reported
> --------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-12717
> URL: https://issues.apache.org/jira/browse/GROOVY-12717
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation
> Affects Versions: 4.0.32, 5.0.8, 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> // package p
> class A {
> protected A(String s) { }
> protected String im() { 'im' }
> protected String getQp() { 'qp' }
> }
> // package q
> @groovy.transform.CompileStatic
> class B extends p.A {
> B() { super('b') }
> static test(p.A a) {
> new p.A('x') // or new p.A([:]) with a protected no-argument
> constructor
> a.im()
> a.qp
> java.util.function.Supplier<String> s = a::im
> java.util.function.Function<p.A, String> f = p.A::im
> }
> }
> {code}
> *Actual:* {{VerifyError: Bad access to protected <init> method}} and
> {{VerifyError: Bad access to protected data in invokevirtual}} when {{B}} is
> loaded, and {{BootstrapMethodError}} for the method references.
> *Expected:* a compile error, as javac gives. Outside its package, a protected
> constructor can only be called by {{super(...)}} or an anonymous class (JLS
> 6.6.2.2), and a protected instance method only through a receiver of the
> subclass (JLS 6.6.2.1, JVMS 4.10.1.8).
> Cause: {{StaticInvocationWriter}} writes {{new}} of such a constructor
> directly. Its GROOVY-7325 check for a method compares the types the wrong way
> round: it tests whether the current class is a subtype of the receiver type,
> not the reverse.
> Verified on 5.0.8, 6.0.0 and master. 4.0.32 fails the same way for the
> constructors and method references, and rejects {{a.im()}} and {{a.qp}} at
> compile time.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)