Skip to content

Better support for changing => into {} functions. #1842

@floitschG

Description

@floitschG

Say you have a method as follows:
method() => foo;

You want to change this into:
method() {
  return foo;
}

You start by placing yourself just before the '=>' and enter '{' which will automatically insert the closing '}'. Pressing enter will now yield:
method() {
} => foo;

What should happen:
The '=>' should be replaced with 'return' (unless the method is declared to be void) and the body should be moved inside the {}.

Metadata

Metadata

Assignees

Labels

closed-obsoleteClosed as the reported issue is no longer relevanttype-enhancementA request for a change that isn't a bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions