[
https://issues.apache.org/jira/browse/GROOVY-12084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18088400#comment-18088400
] ASF GitHub Bot commented on GROOVY-12084: ----------------------------------------- codecov-commenter commented on PR #2605: URL: https://github.com/apache/groovy/pull/2605#issuecomment-4686895712 ## [Codecov](https://app.codecov.io/gh/apache/groovy/pull/2605?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 `75.00000%` with `1 line` in your changes missing coverage. Please review. :white_check_mark: Project coverage is 68.3109%. Comparing base ([`663e8f3`](https://app.codecov.io/gh/apache/groovy/commit/663e8f36f25346f45f0c689dc1fd60e707c2d630?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`30496c5`](https://app.codecov.io/gh/apache/groovy/commit/30496c5ea385ef6590d755d44d71eada120a227b?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. | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2605?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines | |---|---|---| | [...che/groovy/contracts/generation/BaseGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/2605?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fgeneration%2FBaseGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9nZW5lcmF0aW9uL0Jhc2VHZW5lcmF0b3IuamF2YQ==) | 66.6667% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/groovy/pull/2605?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/2605?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) ```diff @@ Coverage Diff @@ ## master #2605 +/- ## ================================================== - Coverage 68.3123% 68.3109% -0.0014% - Complexity 33444 33446 +2 ================================================== Files 1518 1518 Lines 127024 127028 +4 Branches 23055 23055 ================================================== + Hits 86773 86774 +1 - Misses 32544 32545 +1 - Partials 7707 7709 +2 ``` | [Files with missing lines](https://app.codecov.io/gh/apache/groovy/pull/2605?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [...y/contracts/generation/PostconditionGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/2605?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fgeneration%2FPostconditionGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9nZW5lcmF0aW9uL1Bvc3Rjb25kaXRpb25HZW5lcmF0b3IuamF2YQ==) | `91.3044% <100.0000%> (+0.1279%)` | :arrow_up: | | [...che/groovy/contracts/generation/BaseGenerator.java](https://app.codecov.io/gh/apache/groovy/pull/2605?src=pr&el=tree&filepath=subprojects%2Fgroovy-contracts%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fgroovy%2Fcontracts%2Fgeneration%2FBaseGenerator.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VicHJvamVjdHMvZ3Jvb3Z5LWNvbnRyYWN0cy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZ3Jvb3Z5L2NvbnRyYWN0cy9nZW5lcmF0aW9uL0Jhc2VHZW5lcmF0b3IuamF2YQ==) | `92.8571% <66.6667%> (-1.4825%)` | :arrow_down: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/apache/groovy/pull/2605/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> > groovy-contracts: @Synchronized method with @Ensures/@Invariant but no > @Requires throws ClassCastException (SynchronizedStatement → BlockStatement) > --------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: GROOVY-12084 > URL: https://issues.apache.org/jira/browse/GROOVY-12084 > Project: Groovy > Issue Type: Bug > Components: groovy-contracts > Reporter: Paul King > Assignee: Paul King > Priority: Major > > This code: > {code:groovy} > import groovy.contracts.* > class A { > @groovy.transform.Synchronized > //@Requires({ a >= 0 }) > @Ensures({ a >= 0 }) > def m(int a) { return a} > } > def a = new A() > a.m(12) > {code} > Gives this error: > {noformat} > Exception thrown > BUG! exception in phase 'instruction selection' in source unit > 'ConsoleScript6' class org.codehaus.groovy.ast.stmt.SynchronizedStatement > cannot be cast to class org.codehaus.groovy.ast.stmt.BlockStatement > (org.codehaus.groovy.ast.stmt.SynchronizedStatement and > org.codehaus.groovy.ast.stmt.BlockStatement are in unnamed module of loader > org.codehaus.groovy.tools.RootLoader @6e0be858) > at > org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:980) > ... > {noformat} > It runs fine if the @Requires is present. -- This message was sent by Atlassian Jira (v8.20.10#820010)
