Skip to content

Fix type inferencing, syntax highlighting and code navigation for script fields written within closure #1127

@eric-milles

Description

@eric-milles

Consider the following:

import groovy.transform.Field
@Field Number one = 1;
{ -> one = 1.0 }

Variable expression "one" inside the closure is highlighted as a method, since Groovy 2.5+ generates a synthetic setter for non-final script fields. And code navigation (Ctrl+Click) goes to the top of the script instead of the field name.

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions