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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2845?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 `77.46914%` with `73 lines` in your changes missing 
coverage. Please review.
   :white_check_mark: Project coverage is 70.6662%. Comparing base 
([`83ecaa0`](https://app.codecov.io/gh/apache/groovy/commit/83ecaa04ddaa2ff6f8ef2f90228c1ecdd82549d2?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`1cb869a`](https://app.codecov.io/gh/apache/groovy/commit/1cb869a28e29a504b102295d6764826a5825d6ac?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/2845?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/2845?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)
 | 69.6721% | [14 Missing and 23 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...a/org/codehaus/groovy/control/GenericsVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FGenericsVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvR2VuZXJpY3NWaXNpdG9yLmphdmE=)
 | 60.8696% | [3 Missing and 6 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...g/codehaus/groovy/classgen/asm/BytecodeHelper.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FBytecodeHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9CeXRlY29kZUhlbHBlci5qYXZh)
 | 74.1936% | [2 Missing and 6 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...roovy/transform/stc/StaticTypeCheckingSupport.java](https://app.codecov.io/gh/apache/groovy/pull/2845?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)
 | 79.4872% | [1 Missing and 7 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...va/org/apache/groovy/parser/antlr4/AstBuilder.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fparser%2Fantlr4%2FAstBuilder.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9wYXJzZXIvYW50bHI0L0FzdEJ1aWxkZXIuamF2YQ==)
 | 92.8571% | [1 Missing and 3 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...a/org/codehaus/groovy/ast/tools/GenericsUtils.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2Ftools%2FGenericsUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC90b29scy9HZW5lcmljc1V0aWxzLmphdmE=)
 | 63.6364% | [2 Missing and 2 partials :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...haus/groovy/transform/stc/TypeCheckingContext.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FTypeCheckingContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvVHlwZUNoZWNraW5nQ29udGV4dC5qYXZh)
 | 0.0000% | [1 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 |
   | 
[...aus/groovy/ast/expr/ConstructorCallExpression.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2Fexpr%2FConstructorCallExpression.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9leHByL0NvbnN0cnVjdG9yQ2FsbEV4cHJlc3Npb24uamF2YQ==)
 | 95.6522% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2845?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/2845/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/2845?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2845        +/-   ##
   ==================================================
   + Coverage     70.6561%   70.6662%   +0.0102%     
   - Complexity      36541      36636        +95     
   ==================================================
     Files            1571       1571                
     Lines          133997     134214       +217     
     Branches        24697      24780        +83     
   ==================================================
   + Hits            94677      94844       +167     
   - Misses          30803      30818        +15     
   - Partials         8517       8552        +35     
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2845?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[...in/java/org/codehaus/groovy/classgen/Verifier.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2FVerifier.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL1ZlcmlmaWVyLmphdmE=)
 | `89.8980% <100.0000%> (+0.0832%)` | :arrow_up: |
   | 
[...va/org/codehaus/groovy/control/ResolveVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FResolveVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvUmVzb2x2ZVZpc2l0b3IuamF2YQ==)
 | `91.0412% <100.0000%> (+0.0987%)` | :arrow_up: |
   | 
[...aus/groovy/ast/expr/ConstructorCallExpression.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2Fexpr%2FConstructorCallExpression.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC9leHByL0NvbnN0cnVjdG9yQ2FsbEV4cHJlc3Npb24uamF2YQ==)
 | `97.9592% <95.6522%> (-2.0408%)` | :arrow_down: |
   | 
[...haus/groovy/transform/stc/TypeCheckingContext.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Ftransform%2Fstc%2FTypeCheckingContext.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L3RyYW5zZm9ybS9zdGMvVHlwZUNoZWNraW5nQ29udGV4dC5qYXZh)
 | `86.7924% <0.0000%> (ø)` | |
   | 
[...va/org/apache/groovy/parser/antlr4/AstBuilder.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fparser%2Fantlr4%2FAstBuilder.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2dyb292eS9wYXJzZXIvYW50bHI0L0FzdEJ1aWxkZXIuamF2YQ==)
 | `86.5591% <92.8571%> (+0.1514%)` | :arrow_up: |
   | 
[...a/org/codehaus/groovy/ast/tools/GenericsUtils.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fast%2Ftools%2FGenericsUtils.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2FzdC90b29scy9HZW5lcmljc1V0aWxzLmphdmE=)
 | `67.2764% <63.6364%> (-0.0832%)` | :arrow_down: |
   | 
[...g/codehaus/groovy/classgen/asm/BytecodeHelper.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FBytecodeHelper.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9CeXRlY29kZUhlbHBlci5qYXZh)
 | `88.3721% <74.1936%> (-1.0012%)` | :arrow_down: |
   | 
[...roovy/transform/stc/StaticTypeCheckingSupport.java](https://app.codecov.io/gh/apache/groovy/pull/2845?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.5650% <79.4872%> (+0.0348%)` | :arrow_up: |
   | 
[...a/org/codehaus/groovy/control/GenericsVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2845?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fcontrol%2FGenericsVisitor.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NvbnRyb2wvR2VuZXJpY3NWaXNpdG9yLmphdmE=)
 | `90.4762% <60.8696%> (-4.0293%)` | :arrow_down: |
   | 
[...roovy/transform/stc/StaticTypeCheckingVisitor.java](https://app.codecov.io/gh/apache/groovy/pull/2845?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)
 | `86.7214% <69.6721%> (-0.5388%)` | :arrow_down: |
   
   ... and [11 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2845/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>




> Java compatibility: remaining generic type syntax
> -------------------------------------------------
>
>                 Key: GROOVY-12319
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12319
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Daniel Sun
>            Priority: Major
>
> Groovy already accepts most Java generics. Three Java forms still fail — two 
> in the parser, one in {{GenericsVisitor}}. Each has a local workaround. 
> Method type arguments such as {{Helper.<String>identity(x\)}} already work 
> and are not part of this request.
> h3. 1. Diamond {{<>}} on an anonymous class
> Java 9+ (JEP 213) allows:
> {code:java}
> Processor<String> p = new Processor<>() {
>     public String process(String val) { return val; }
> };
> {code}
> Groovy rejects this with {{Cannot use diamond <> with anonymous inner 
> classes}}. Writing  new Processor<String>() \{ ... \}  compiles.
> GROOVY-6730 and GROOVY-7159 were false-positive STC errors when diamond was 
> _not_ used; they did not add this form.
> h3. 2. Qualified parameterized inner types ("rare" types)
> Java allows an inner type to keep the outer's type arguments:
> {code:java}
> class Outer<T> {
>     class Inner<U> {}
> }
> Outer<String>.Inner<Integer> x;
> {code}
> Groovy fails to parse {{Outer<String>.Inner}} ({{Unexpected input}}). A 
> factory that returns {{Inner}} without naming {{Outer<T>.Inner}} is a 
> workaround. The same qualification appears in {{o.new Inner<Integer>(42)}}.
> h3. 3. Explicit type arguments on constructors, {{this()}} and {{super()}}
> Java allows:
> {code:java}
> class Box {
>     <T> Box(T t) {}
> }
> new <String>Box("x");
> {code}
> and, on generic constructors, {{<T>this()}}, {{<T>super()}}, 
> {{recv.<T>super()}}, and {{outer.new <T>Inner(...)}}.
> Groovy fails at {{new <}} with {{Unexpected input: '<'}}. Inference ({{new 
> Box("x")}}) is the workaround.
> Constructor type arguments are already tracked by GROOVY-10501. The 
> {{this()}} / {{super()}} / inner-{{new}} forms are the same JLS production 
> (JLS 15.9) and should be handled together.
> h3. Related
> * GROOVY-10501 — constructor type arguments (open)
> * GROOVY-6730, GROOVY-7159 — diamond + anonymous class, STC false positives 
> (fixed)



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

Reply via email to