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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3048?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 73.6155%. Comparing base 
([`e301e08`](https://app.codecov.io/gh/apache/groovy/commit/e301e08c4de31eb61b0805e45c7a99b879f165f9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`3ab8420`](https://app.codecov.io/gh/apache/groovy/commit/3ab842047a8b2c1f248a54006a7b44eb9bee93da?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3048/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/3048?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3048        +/-   ##
   ==================================================
   + Coverage     73.6073%   73.6155%   +0.0082%     
   - Complexity      42312      42313         +1     
   ==================================================
     Files            1657       1657                
     Lines          145620     145646        +26     
     Branches        27466      27477        +11     
   ==================================================
   + Hits           107187     107218        +31     
   + Misses          28469      28466         -3     
   + Partials         9964       9962         -2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3048?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/3048?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.3939% <100.0000%> (+0.2995%)` | :arrow_up: |
   
   ... and [14 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3048/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>




> super.name() and super.name miss an extension method that the class overrides
> -----------------------------------------------------------------------------
>
>                 Key: GROOVY-12522
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12522
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> When a class declares its own version of an extension method of its 
> superclass, {{super.name()}} and {{super.name}} in dynamic Groovy and under 
> {{@TypeChecked}} do not find the superclass's extension method:
> {code:groovy}
> class Numbers extends ArrayList<Integer> {
>     Numbers() { super([1, 2, 3]) }
>     Integer first() { -1 }
>     def test() { super.first() }
> }
> class Bean {
>     Map getProperties() { [:] }
>     def test() { super.properties.containsKey('class') }
> }
> class Text extends File {
>     Text(String path) { super(path) }
>     String getText() { 'own' }
>     def test() { [super.getText(), super.text] }
> }
> assert new Numbers().test() == 1 // fails: MissingMethodException: No 
> signature of method: first for class: java.util.ArrayList
> assert new Bean().test()          // fails: MissingPropertyException: No such 
> property: properties for class: Bean
> def file = File.createTempFile('text', '.txt')
> file.text = 'content'
> assert new Text(file.path).test() == ['content', 'content'] // fails: 
> NullPointerException: charsetName
> {code}
> {{super.getText()}} calls {{getText(File, String charset)}} with a null 
> charset, the only {{getText}} left for {{super}}. Without the class's own 
> method, all three work. Under {{@CompileStatic}} these calls work, but 
> {{super.text += 'x'}} compiles to a dynamic property access and fails the 
> same way. Seen in 4.0.33, 5.0.8, 6.0.0 and master.
> For {{super}}, a method the class declares is replaced by the MOP method 
> {{super$2$name}} of the superclass method it overrides, or dropped when there 
> is none. An extension method has no MOP method, so the class's method is 
> dropped, and the extension method it replaced in the method index is not 
> restored.
> Expected: {{super.name()}} and {{super.name}} call the superclass's extension 
> method, as they do when the class does not declare the method.
> PR: https://github.com/apache/groovy/pull/3048 (split out of 
> https://github.com/apache/groovy/pull/3044)



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

Reply via email to