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

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

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

   ## 
[Codecov](https://app.codecov.io/gh/apache/groovy/pull/2172?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 `87.50000%` with `1 line` in your changes 
missing coverage. Please review.
   > Project coverage is 68.8448%. Comparing base 
[(`6ce967f`)](https://app.codecov.io/gh/apache/groovy/commit/6ce967f8019f175e589e71873f025b0a16bb0a13?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 to head 
[(`9413b2d`)](https://app.codecov.io/gh/apache/groovy/commit/9413b2dd224b1928270e69e6b5e6f57d42230b67?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/2172?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Patch % | Lines |
   |---|---|---|
   | 
[.../codehaus/groovy/classgen/asm/StatementWriter.java](https://app.codecov.io/gh/apache/groovy/pull/2172?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FStatementWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9TdGF0ZW1lbnRXcml0ZXIuamF2YQ==)
 | 87.5000% | [0 Missing and 1 partial :warning: 
](https://app.codecov.io/gh/apache/groovy/pull/2172?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/2172/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/2172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   ```diff
   @@                Coverage Diff                 @@
   ##               master      #2172        +/-   ##
   ==================================================
   + Coverage     68.8443%   68.8448%   +0.0005%     
   - Complexity      29533      29535         +2     
   ==================================================
     Files            1421       1421                
     Lines          113424     113429         +5     
     Branches        19644      19644                
   ==================================================
   + Hits            78086      78090         +4     
   - Misses          28754      28755         +1     
     Partials         6584       6584                
   ```
   
   | [Files with missing 
lines](https://app.codecov.io/gh/apache/groovy/pull/2172?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 | Coverage Δ | |
   |---|---|---|
   | 
[.../codehaus/groovy/classgen/asm/StatementWriter.java](https://app.codecov.io/gh/apache/groovy/pull/2172?src=pr&el=tree&filepath=src%2Fmain%2Fjava%2Forg%2Fcodehaus%2Fgroovy%2Fclassgen%2Fasm%2FStatementWriter.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3JjL21haW4vamF2YS9vcmcvY29kZWhhdXMvZ3Jvb3Z5L2NsYXNzZ2VuL2FzbS9TdGF0ZW1lbnRXcml0ZXIuamF2YQ==)
 | `96.8927% <87.5000%> (-0.2420%)` | :arrow_down: |
   
   ... and [5 files with indirect coverage 
changes](https://app.codecov.io/gh/apache/groovy/pull/2172/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>




> variable declared in try block is in scope in finally block
> -----------------------------------------------------------
>
>                 Key: GROOVY-4721
>                 URL: https://issues.apache.org/jira/browse/GROOVY-4721
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.4.0-rc-1
>            Reporter: Hamlet D'Arcy
>            Priority: Major
>              Labels: bytecode
>
> This code should fail because 'x' is out of scope in the finally block. 
> {code}
> class MyClass {
>     def myMethod() {
>         try {
>             def x = 'foo'
>             println x
>         }
>         finally {
>             println x
>         }
>     }
> }
> new MyClass().myMethod()
> {code}
> Instead it prints 'foo' twice. 
> if myMethod is static then it shows the behavior I expect. 
> Could be something wrong with VariableScope somewhere? 
> This example is from the Groovy codebase. We have code that relies on this 
> behavior (although it is easy to find and fix, just run the UnusedVariable 
> codenarc inspection, which is how I found it)



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

Reply via email to