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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2801?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 `62.50000%` with `12 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 70.1210%. Comparing base 
([`9230bc8`](https://app.codecov.io/gh/apache/groovy/commit/9230bc83342c47eb7cdaf61b21f617c38f2f6716?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`257c7f5`](https://app.codecov.io/gh/apache/groovy/commit/257c7f5e8659375d2e46172c057013e0799afe16?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.
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2801?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[...codehaus/groovy/classgen/asm/InvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/2801?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FInvocationWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9JbnZvY2F0aW9uV3JpdGVyLmphdmE=)
 | 62.5000% | [2 Missing and 10 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2801?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/2801/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/2801?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2801        +/-   ##
   ==================================================
   + Coverage     70.1192%   70.1210%   +0.0017%     
   - Complexity      35808      35816         +8     
   ==================================================
     Files            1562       1562                
     Lines          132413     132444        +31     
     Branches        24355      24370        +15     
   ==================================================
   + Hits            92847      92871        +24     
   + Misses          31164      31163         -1     
   - Partials         8402       8410         +8     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2801?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/asm/InvocationWriter.java](https://app.codecov.io/gh/apache/groovy/pull/2801?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FInvocationWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9JbnZvY2F0aW9uV3JpdGVyLmphdmE=)
 | `86.3636% <62.5000%> (-1.4258%)` | :arrow_down: |
   
   ... and [6 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2801/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>




> `GroovyCastException: Cannot cast object PojoWrapper` when an as coercion is 
> passed directly as an argument to an anonymous inner class constructor
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12232
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12232
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.8, 5.1.0, 6.0.0-beta-2
>            Reporter: Octavia Togami
>            Assignee: Paul King
>            Priority: Minor
>
> This used to work on Groovy 4.0.33, but fails now on 5.0.8:
> {code:groovy}
> class Test {
>     Test(Set<String> values) {}
> }
> new Test(['a'] as Set) {}
> {code}
> The error is:
> {code:sh}
> GroovyCastException: Cannot cast object 
> 'org.codehaus.groovy.runtime.wrappers.PojoWrapper@47fbc56'
>     with class 'org.codehaus.groovy.runtime.wrappers.PojoWrapper' to class 
> 'java.util.Set'
> {code}
> Without the anon class, coercion (e.g. using {{Set.of(...)}}), if it's stored 
> in a local var first, or if the class constructor is not statically 
> resolvable; it works fine.
> This was reduced from real code in Gradle: 
> https://github.com/gradle/gradle/blob/be7b1d956fd466144fbb3a1e268bfd6704205250/platforms/jvm/java-compiler-worker/src/test/groovy/org/gradle/api/internal/tasks/compile/AnnotationProcessingCompileTaskTest.groovy#L58



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to