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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3124?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 74.1122%. Comparing base 
([`cd944a5`](https://app.codecov.io/gh/apache/groovy/commit/cd944a5f0ee353126e6f6a484f574b4b53e555fd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`70716c1`](https://app.codecov.io/gh/apache/groovy/commit/70716c1e8eca492d445808cd2e8295d1f87c1334?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 1 commits behind head on master.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3124/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=apache)](https://app.codecov.io/gh/apache/groovy/pull/3124?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3124        +/-   ##
   ==================================================
   + Coverage     74.1016%   74.1122%   +0.0105%     
   - Complexity      43596      43612        +16     
   ==================================================
     Files            1692       1692                
     Lines          149245     149267        +22     
     Branches        28284      28290         +6     
   ==================================================
   + Hits           110593     110625        +32     
   + Misses          28475      28466         -9     
   + Partials        10177      10176         -1     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3124?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...groovy/transform/trait/TraitASTTransformation.java](https://app.codecov.io/gh/apache/groovy/pull/3124?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Ftrait%2FTraitASTTransformation.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS90cmFpdC9UcmFpdEFTVFRyYW5zZm9ybWF0aW9uLmphdmE=)
 | `92.7808% <100.0000%> (+0.2600%)` | :arrow_up: |
   | 
[...oovy/transform/trait/TraitReceiverTransformer.java](https://app.codecov.io/gh/apache/groovy/pull/3124?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Ftrait%2FTraitReceiverTransformer.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS90cmFpdC9UcmFpdFJlY2VpdmVyVHJhbnNmb3JtZXIuamF2YQ==)
 | `88.8325% <100.0000%> (ø)` | |
   
   ... and [18 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3124/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>




> Calling a stateful trait static method through the trait fails with 
> MissingMethodException for the internal field accessor
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12597
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12597
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> trait T {
>     private static boolean flag = true
>     static boolean isReady() { flag }
> }
> class C implements T {}
> assert C.isReady()
> assert T.isReady()
> {code}
> Actual: {{T.isReady()}} (and {{T.ready}}) throws 
> {{groovy.lang.MissingMethodException: No signature of static method: 
> T__flag$get for class: T is applicable for argument types: () values: []}}. 
> The same happens in dynamic Groovy, with @TypeChecked and with 
> @CompileStatic, and for static properties, setters, closures and private 
> static helpers.
> Expected: trait static state belongs to each implementing class, so the trait 
> itself has none. The call should fail with an error that says so, not with a 
> missing internal accessor. Stateless static methods called through the trait 
> keep working.
> Cause: the promoted interface static forwarder passes the trait class as the 
> static self of the helper method. A static field access in the helper becomes 
> a call to the generated accessor (here T__flag$get) on that class, and only 
> implementing classes declare one.
> Seen in 6.0.0. 5.x does not promote trait statics onto the interface.
> PR: https://github.com/apache/groovy/pull/3124



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to