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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3132?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.1021%. 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 
([`3ff2f13`](https://app.codecov.io/gh/apache/groovy/commit/3ff2f13da90bfe37c2a30a485fde1a2bbd6ee0cd?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/3132/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/3132?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3132        +/-   ##
   ==================================================
   + Coverage     74.1016%   74.1021%   +0.0005%     
   - Complexity      43596      43608        +12     
   ==================================================
     Files            1692       1692                
     Lines          149245     149263        +18     
     Branches        28284      28291         +7     
   ==================================================
   + Hits           110593     110607        +14     
   - Misses          28475      28477         +2     
   - Partials        10177      10179         +2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3132?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...codehaus/groovy/classgen/VariableScopeVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3132?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FVariableScopeVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL1ZhcmlhYmxlU2NvcGVWaXNpdG9yLmphdmE=)
 | `94.3428% <100.0000%> (+0.0860%)` | :arrow_up: |
   
   ... and [15 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3132/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>




> A static accessor method of a trait cannot be referenced as a property from a 
> static method of the implementing class
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12605
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12605
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 4.0.33, 5.0.8, 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {code:groovy}
> trait T { static boolean isVr() { true } }
> class C implements T { static m() { vr } }
> assert C.m()
> {code}
> Actual: compilation fails in dynamic, type-checked and statically compiled 
> code alike:
> {noformat}
> Apparent variable 'vr' was found in a static scope but doesn't refer to a 
> local variable, static field or class.
> {noformat}
> The same happens for a static getter, for a static setter used as an 
> assignment target, and for a static property or accessor inherited through a 
> super trait (trait U extends T, class C implements U).
> Expected: the bare name resolves to the static accessor woven into C, as it 
> does when the method is declared in a superclass and as it already does from 
> instance methods of C.
> Cause: VariableScopeVisitor.findClassMember creates a pseudo-property for 
> accessor methods of the class and its superclasses, but for traits it looks 
> only at fields and properties, and it does not follow a super trait that is 
> still in the extends clause before the trait transformation. StaticVerifier 
> then rejects the unresolved name.
> Seen in 4.0.33, 5.0.8 and 6.0.0.
> PR: https://github.com/apache/groovy/pull/3132



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

Reply via email to