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

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

Closed
eric-milles opened this issue Jan 29, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@eric-milles
Copy link
Member

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.

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

No branches or pull requests

1 participant