Skip to content

Fix content assist for constructor with Closure as last param #643

@eric-milles

Description

@eric-milles

Assuming content assist preferences "Fill method arguments and show guessed arguments" and "Place trailing closure arguments after closing parenthesis" are checked, completion of constructor with last param of type Closure produces invalid syntax.

class Foo {
  Foo(Number number, Closure closure) {
    closure()
  }
}

new Foo|

Content assist (Ctrl+Space) at | and selection of Foo() proposal results in replacement new Foo(number) { | }. This is mistaken for new anonymous inner type.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions