You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "eric-milles (via GitHub)" <gi...@apache.org> on 2025/05/22 17:18:42 UTC

[PR] GROOVY-11664: STC: combine generics of same-type witnesses [groovy]

eric-milles opened a new pull request, #2230:
URL: https://github.com/apache/groovy/pull/2230

   Merging of type witness data -- see GROOVY-5692 and GROOVY-10006 -- was not applied to equal/compatible type case.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GROOVY-11664: STC: combine generics of same-type witnesses [groovy]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #2230:
URL: https://github.com/apache/groovy/pull/2230#issuecomment-2902060029

   ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2230?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: Patch coverage is `60.00000%` with `2 lines` in your changes missing coverage. Please review.
   > Project coverage is 69.0339%. Comparing base [(`1889601`)](https://app.codecov.io/gh/apache/groovy/commit/1889601d5b4ed541a0db7f69d90f17ec66681411?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`06dc049`)](https://app.codecov.io/gh/apache/groovy/commit/06dc049d444281b16ea28d8133d81afdb3e30231?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/2230?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/2230?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) | 60.0000% | [0 Missing and 2 partials :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2230?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/2230/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/2230?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2230        +/-   ##
   ==================================================
   + Coverage     69.0334%   69.0339%   +0.0005%     
   - Complexity      29694      29698         +4     
   ==================================================
     Files            1423       1423                
     Lines          114378     114383         +5     
     Branches        19847      19850         +3     
   ==================================================
   + Hits            78959      78963         +4     
     Misses          28783      28783                
   - Partials         6636       6637         +1     
   ```
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2230?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/StaticTypeCheckingSupport.java](https://app.codecov.io/gh/apache/groovy/pull/2230?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) | `81.5648% <60.0000%> (-0.0974%)` | :arrow_down: |
   
   ... and [4 files with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2230/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>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GROOVY-11664: STC: combine generics of same-type witnesses [groovy]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #2230:
URL: https://github.com/apache/groovy/pull/2230#discussion_r2106163477


##########
src/main/java/org/codehaus/groovy/transform/stc/StaticTypeCheckingSupport.java:
##########
@@ -1537,6 +1537,14 @@ && isUsingGenericsOrIsArrayUsingGenerics(type.getComponentType())) {
                 }
                 return true; // incompatible
             }
+            if (!fixedPlaceHolders.contains(entry.getKey())
+                    && !resolved.isPlaceholder() && !resolved.isWildcard()
+                    && !candidate.isPlaceholder() && !candidate.isWildcard()) {

Review Comment:
   [nitpick] The boolean expression is quite long and complex; consider extracting it into a well-named predicate method to improve readability.
   ```suggestion
               if (shouldUpdateResolvedGenerics(fixedPlaceHolders, entry.getKey(), resolved, candidate)) {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GROOVY-11664: STC: combine generics of same-type witnesses [groovy]

Posted by "daniellansun (via GitHub)" <gi...@apache.org>.
daniellansun commented on PR #2230:
URL: https://github.com/apache/groovy/pull/2230#issuecomment-2907753541

   +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GROOVY-11664: STC: combine generics of same-type witnesses [groovy]

Posted by "daniellansun (via GitHub)" <gi...@apache.org>.
daniellansun commented on PR #2230:
URL: https://github.com/apache/groovy/pull/2230#issuecomment-2907755387

   Merged. Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GROOVY-11664: STC: combine generics of same-type witnesses [groovy]

Posted by "daniellansun (via GitHub)" <gi...@apache.org>.
daniellansun merged PR #2230:
URL: https://github.com/apache/groovy/pull/2230


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@groovy.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org