Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to definition for @Fields and def fails #56

Open
stevenh opened this issue Aug 7, 2023 · 2 comments
Open

Go to definition for @Fields and def fails #56

stevenh opened this issue Aug 7, 2023 · 2 comments

Comments

@stevenh
Copy link

stevenh commented Aug 7, 2023

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.'
}
@stevenh
Copy link
Author

stevenh commented Aug 8, 2023

In case it helps, Find References works as expected, including finding the definition.

@stevenh stevenh changed the title Go to definition for @Field fails Go to definition for @Fields and def fails Aug 8, 2023
@stevenh
Copy link
Author

stevenh commented Aug 8, 2023

Also fails with def definition too, so in the case above select variable and Go to Definition fails with the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant