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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3047?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 `66.66667%` with `1 line` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 73.6070%. 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 
([`19441c9`](https://app.codecov.io/gh/apache/groovy/commit/19441c9fcda57749d066eef696cfa23256ee06c9?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3047?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[src/main/java/groovy/lang/MetaClassImpl.java](https://app.codecov.io/gh/apache/groovy/pull/3047?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=)
 | 66.6667% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/3047?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>
   
   
   
   [![Impacted file tree 
graph](https://app.codecov.io/gh/apache/groovy/pull/3047/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/3047?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #3047        +/-   ##
   ==================================================
   - Coverage     73.6073%   73.6070%   -0.0003%     
     Complexity      42312      42312                
   ==================================================
     Files            1657       1657                
     Lines          145620     145622         +2     
     Branches        27466      27467         +1     
   ==================================================
   + Hits           107187     107188         +1     
   + Misses          28469      28468         -1     
   - Partials         9964       9966         +2     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/3047?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/3047?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.0620% <66.6667%> (-0.0325%)` | :arrow_down: |
   
   ... and [16 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/3047/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.x = value calls the class's own setter when the superclass overloads 
> the setter
> -------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12521
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12521
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> When the superclass declares several setters for a property, for example 
> {{setX(int)}} and {{setX(String)}}, and the class overrides one of them or 
> declares the property itself, {{super.x = value}} in dynamic Groovy and under 
> {{@TypeChecked}} calls the class's own setter:
> {code:groovy}
> class Base {
>     List<String> log = []
>     String getX() { 'x:base' }
>     void setX(int i) { log << 'base:int:' + i }
>     void setX(String s) { log << 'base:string:' + s }
> }
> class Sub extends Base {
>     String x = 'x:sub'
>     List<String> test() {
>         super.x = 'a'
>         super.x = 1
>         log + [x]
>     }
> }
> assert new Sub().test() == ['base:string:a', 'base:int:1', 'x:sub'] // fails: 
> [base:int:1, a]
> {code}
> {{super.x = 'a'}} called {{Sub.setX(String)}}, the setter of {{Sub}}'s own 
> property. The same happens inside a closure. {{super.setX('a')}} calls 
> {{Base.setX(String)}}, and so does {{super.x = 'a'}} under {{@CompileStatic}} 
> or when {{Base}} has a single setter. Seen in 4.0.33, 5.0.8, 6.0.0 and master.
> For {{super}}, a property with several setters is a 
> {{MultipleSetterProperty}}, and its {{setProperty}} calls the setter by name 
> with ordinary dispatch.
> Expected: {{super.x = value}} chooses among the setters of the superclass, 
> like {{super.setX(value)}}.
> PR: https://github.com/apache/groovy/pull/3047



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

Reply via email to