Skip to content

Named argument completion for methods with Closure as last parameter may produce syntax error #445

@eric-milles

Description

@eric-milles

Invoke content assist at the given caret position and choose sort(boolean mutate, Closure closure).

[].sort|

If Use named arguments for method calls and Place trailing closure arguments after closing parenthesis are both checked in Window > Preferences > Groovy > Editor > Content Assist, the following is inserted:

[].sort(mutate: mutate) closure: closure

or

[].sort(mutate: mutate) closure: { it }

if Use closure literals for closure arguments is also checked.

The argument name outside the parens is a syntax error.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions