[
https://issues.apache.org/jira/browse/GROOVY-12821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18149512#comment-18149512
] ASF GitHub Bot commented on GROOVY-12821: ----------------------------------------- codecov-commenter commented on PR #3332: URL: https://github.com/apache/groovy/pull/3332#issuecomment-7089561549 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/3332?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 `87.14286%` with `9 lines` in your changes missing coverage. Please review. :white_check_mark: Project coverage is 74.9599%. Comparing base ([`09e84fa`](https://app.codecov.io/gh/apache/groovy/commit/09e84fa4b0d4c37a5ac2efc48dfd2db93a84cab7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`0d8c333`](https://app.codecov.io/gh/apache/groovy/commit/0d8c333ce4de4f9eeff1af002522520295b84870?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/3332?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines | |---|---|---| | [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3332?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | 87.1429% | [1 Missing and 8 partials :warning: ](https://app.codecov.io/gh/apache/groovy/pull/3332?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> [](https://app.codecov.io/gh/apache/groovy/pull/3332?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #3332 +/- ## ================================================== + Coverage 74.9518% 74.9599% +0.0081% - Complexity 48908 48962 +54 ================================================== Files 1768 1768 Lines 161213 161325 +112 Branches 31728 31767 +39 ================================================== + Hits 120832 120929 +97 - Misses 28968 28975 +7 - Partials 11413 11421 +8 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/3332?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3332?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nVmlzaXRvci5qYXZh) | `87.9435% <87.1429%> (+0.0264%)` | :arrow_up: | ... and [12 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/3332/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> > SC: ClassCastException when a closure shared variable is assigned instances > of two different subclasses > ------------------------------------------------------------------------------------------------------- > > Key: GROOVY-12821 > URL: https://issues.apache.org/jira/browse/GROOVY-12821 > Project: Groovy > Issue Type: Bug > Reporter: Scott Murphy Heiberg > Priority: Major > > On master (09e84fa), JDK 25.0.4: > {code:groovy} > @groovy.transform.CompileStatic > class Outer { > static class Box { > String id = 'box' > String pm() { 'pm:' + id } > static String t() { Sub s = new Sub1(); def c = { -> s.pm() }; s = > new Sub2(); c() } > } > static class Sub extends Box { } > static class Sub1 extends Sub { Sub1() { id = 'sub1' } } > static class Sub2 extends Sub { Sub2() { id = 'sub2' } } > } > assert Outer.Box.t() == 'pm:sub2' > {code} > Dynamic Groovy and {{@TypeChecked}} return {{pm:sub2}}. Under > {{@CompileStatic}} it compiles and throws ClassCastException at run time > ({{Outer$Sub2}} cannot be cast to {{Outer$Sub1}}): the shared variable is > cast to the type of its first assignment. -- This message was sent by Atlassian Jira (v10.3.26#10030026)
