[
https://issues.apache.org/jira/browse/GROOVY-12601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18135595#comment-18135595
]
ASF GitHub Bot commented on GROOVY-12601:
-----------------------------------------
codecov-commenter commented on PR #3128:
URL: https://github.com/apache/groovy/pull/3128#issuecomment-6539694690
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3128?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.1042%. 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
([`f73565a`](https://app.codecov.io/gh/apache/groovy/commit/f73565a50f5220ba2b881c6d1499435af446167c?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>
[](https://app.codecov.io/gh/apache/groovy/pull/3128?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3128 +/- ##
==================================================
+ Coverage 74.1016% 74.1042% +0.0026%
- Complexity 43596 43604 +8
==================================================
Files 1692 1692
Lines 149245 149260 +15
Branches 28284 28287 +3
==================================================
+ Hits 110593 110608 +15
+ Misses 28475 28473 -2
- Partials 10177 10179 +2
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3128?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
| Coverage Δ | |
|---|---|---|
|
[...oovy/transform/stc/TraitTypeCheckingExtension.java](https://app.codecov.io/gh/apache/groovy/pull/3128?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FTraitTypeCheckingExtension.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvVHJhaXRUeXBlQ2hlY2tpbmdFeHRlbnNpb24uamF2YQ==)
| `82.3529% <100.0000%> (+1.3403%)` | :arrow_up: |
... and [14 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3128/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 calls the java.lang.Class method instead of a @Virtual trait static method
> of the same name
> ----------------------------------------------------------------------------------------------
>
> Key: GROOVY-12601
> URL: https://issues.apache.org/jira/browse/GROOVY-12601
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 6.0.0
> Reporter: Scott Murphy Heiberg
> Priority: Major
>
> {code:groovy}
> import groovy.transform.Virtual
> @groovy.transform.CompileStatic
> trait T {
> @Virtual static String getName() { 'trait' }
> static String sm() { getName() }
> }
> class C implements T { static String getName() { 'impl' } }
> class D implements T {}
> assert C.sm() == 'impl'
> assert D.sm() == 'trait'
> {code}
> Actual: {{C.sm()}} returns {{'C'}} and {{D.sm()}} returns {{'D'}}. The trait
> calls {{Class.getName()}}. The same happens for other {{Class}} and DGM names
> such as {{getSimpleName}}, {{isInterface}}, {{getModifiers}} and {{dump}}. A
> {{@Virtual static Object cast(Object)}} fails with a {{ClassCastException}}.
> It also happens from instance trait methods and for a {{@Virtual}} static of
> a super trait.
> Expected: {{'impl'}} and {{'trait'}}, as dynamic Groovy and {{@TypeChecked}}
> give.
> The trait transformation rewrites the call to a call on the static self (a
> Class) and marks it for dynamic dispatch. Static type checking finds
> {{Class.getName()}} on that receiver, so the trait type checking extension is
> never asked and static compilation binds the call to the {{Class}} method.
> Seen in 6.0.0 (the first version with @Virtual).
> PR: https://github.com/apache/groovy/pull/3128
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)