When trying to use Clover on a Groovy class that is marked @CompileStatic and it contains a null-safe operator (e.g. Bar bar = foo?.bar), then the groovyc compilation fails with the error:
No such property: bar for class: java.lang.Object
The error is that the generated
$CLV_safeEval${code} method returns an Object instead of the type of the property. This then causes Groovy compiler to fail later. I've created a sample project that exhibits the problem at https://github.com/johnrengelman/clover-grooyv-compilestatic Simply run
./gradlew test
[CLOV-1490] Clover safeEval method is imcompatible with Groovy's @CompileStatic annotation
Workflow | Original: New Clover Workflow [ 898131 ] | New: New Clover Workflow - Restricted [ 1474502 ] |
Workflow | Original: Clover Workflow [ 896445 ] | New: New Clover Workflow [ 898131 ] |
Workflow | Original: reviewflow [ 681479 ] | New: Clover Workflow [ 896445 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: To be reviewed [ 10026 ] | New: Resolved [ 5 ] |
Attachment | New: grails-clover-4.0.1-pre-release.ZIP [ 126586 ] |
Status | Original: In Progress [ 3 ] | New: To be reviewed [ 10026 ] |
Remote Link |
New:
This issue links to "Clover › All Ant Groovy Tests › |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Story Points | New: 3 |