groovy-guru
groovy-guru copied to clipboard
Go to definition for @Fields and def fails
When selecting Go to Definition
on a @Field
definition for a Jenkinsfile
it fails with:
Cannot read properties of undefined (reading 'with')
This should be a minimal example, if you select MYFIELD
use.
import groovy.transform.Field
@Field final MYFIELD = 'SomeValue'
def variable = 'otherValue'
if (variable == MYFIELD) {
echo 'Value matches.'
}
In case it helps, Find References
works as expected, including finding the definition.
Also fails with def
definition too, so in the case above select variable and Go to Definition
fails with the same error.