[
https://issues.apache.org/jira/browse/GROOVY-7204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140235#comment-18140235
]
ASF GitHub Bot commented on GROOVY-7204:
----------------------------------------
codecov-commenter commented on PR #3261:
URL: https://github.com/apache/groovy/pull/3261#issuecomment-6706597966
##
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/3261?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.03704%` with `7 lines` in your changes missing
coverage. Please review.
:white_check_mark: Project coverage is 74.4051%. Comparing base
([`d020012`](https://app.codecov.io/gh/apache/groovy/commit/d02001286af335c8777fb9f5770e48ec4d07119f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
to head
([`0a05d69`](https://app.codecov.io/gh/apache/groovy/commit/0a05d697ade68ca3c429242c76a1bbbf8f6743e1?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/3261?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/StaticTypeCheckingSupport.java](https://app.codecov.io/gh/apache/groovy/pull/3261?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingSupport.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nU3VwcG9ydC5qYXZh)
| 87.5000% | [0 Missing and 6 partials :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3261?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
|
|
[...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/3261?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)
| 83.3333% | [0 Missing and 1 partial :warning:
](https://app.codecov.io/gh/apache/groovy/pull/3261?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/3261?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #3261 +/- ##
==================================================
+ Coverage 74.4010% 74.4051% +0.0041%
- Complexity 44345 44369 +24
==================================================
Files 1699 1699
Lines 150998 151038 +40
Branches 28770 28789 +19
==================================================
+ Hits 112344 112380 +36
+ Misses 28380 28377 -3
- Partials 10274 10281 +7
```
| [Files with missing
lines](https://app.codecov.io/gh/apache/groovy/pull/3261?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/3261?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)
| `88.0345% <83.3333%> (-0.0107%)` | :arrow_down: |
|
[...roovy/transform/stc/StaticTypeCheckingSupport.java](https://app.codecov.io/gh/apache/groovy/pull/3261?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FStaticTypeCheckingSupport.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvU3RhdGljVHlwZUNoZWNraW5nU3VwcG9ydC5qYXZh)
| `82.3821% <87.5000%> (+0.1144%)` | :arrow_up: |
... and [9 files with indirect coverage
changes](https://app.codecov.io/gh/apache/groovy/pull/3261/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>
> Static type checking and compilation fail when multiple generics in use
> -----------------------------------------------------------------------
>
> Key: GROOVY-7204
> URL: https://issues.apache.org/jira/browse/GROOVY-7204
> Project: Groovy
> Issue Type: Bug
> Components: Static compilation, Static Type Checker
> Affects Versions: 2.3.8
> Reporter: Mauro Molinari
> Assignee: Daniel Sun
> Priority: Critical
> Fix For: 3.0.0-alpha-3, 2.5.0-rc-3
>
>
> Consider the following interfaces:
> {code:title=CrudRepository.java}
> package f;
> import java.io.Serializable;
> public interface CrudRepository<T, S extends Serializable> {
> void delete(S arg);
> void delete(T arg);
> }
> {code}
> {code:title=MyRepository.java}
> package f;
> public interface MyRepository extends CrudRepository<String, Long> {
> }
> {code}
> The following implementation class:
> {code:title=MyRepositoryImpl.java}
> package f;
> public class MyRepositoryImpl implements MyRepository {
> @Override
> public void delete(String arg) {
> System.out.println("String");
> }
> @Override
> public void delete(Long arg) {
> System.out.println("Long");
> }
> }
> {code}
> And the following Groovy class:
> {code:title=MyClass.groovy}
> package f
> import groovy.transform.CompileStatic;
> import groovy.transform.TypeChecked;
> @TypeChecked
> class MyClass {
> static MyRepository factory() {
> return new MyRepositoryImpl()
> }
>
> static void main(String[] args) {
> MyRepository r = factory()
> r.delete('foo')
> }
> }
> {code}
> Static type checking returns the following error:
> {noformat}
> MyClass.groovy: 15: [Static type checking] - Cannot call
> f.MyRepository#delete(S) with arguments [java.lang.String]
> {noformat}
> The same applies if you use {{@CompileStatic}} instead of {{@TypeChecked}}.
> Note that if, In the previous code, you change the method {{main}} by
> replacing:
> {code}
> MyRepository r = factory()
> {code}
> with:
> {code}
> MyRepository r = new MyRepositoryImpl()
> {code}
> compilation succeeds. However in real code this might not be possible (the
> {{MyRepository}} instance may be injected and auto-generated, think of Spring
> Data for instance).
> The only workaround is (yet again...) to disable static type checking and
> static compilation.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)