Skip to content

Moving last argument when there others with omitted type in Go #21

Open
@vladimiroff

Description

@vladimiroff

Suppose we have the function foo defined as follows:

func foo(a string, b string) { ... }

Given that both arguments are of the same type we could omit the type declaration of a:

func foo(a, b string) { ... }

In that case when moving any of the arguments, a becomes the last argument without declared type, which is invalid Go code:

func foo(b string, a) { ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions