Skip to content

Function completion should leverage trailing closure syntax #854

@tristanlabelle

Description

@tristanlabelle

Given func foo(a: Int, b: () -> ()) {}, the completion for foo is foo(a: Int, b: () -> ()) with snippets on the types. It's more swifty to use the trailing closure syntax, so it would be nice for this to be foo(a: Int) {}, or some variant inside the closure.

Bonus points if the trailing closure syntax is avoided if the expression is inside of an if / while statement since that generates a warning that the curly braces are confusing.

completion without trailing closure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions