Skip to content

swift format fails when using new sending keyword #2836

@fabianfett

Description

@fabianfett

swift format fails when using new sending keyword.

Steps To Reproduce:

  1. Create a Foo.swift with following content and save:
struct Foo {
  var bar: String
}

func whatever(_ foo: sending Foo) {

}
  1. Run swift format Foo.swift on cli.

Results:

Observed:

Invocation fails: /Users/fabian/Developer/test.swift:5:30: error: unexpected code 'Foo' in parameter clause.

Expected:

swift format succeeds.

Notes:

Fails with Swift from Xcode-beta and swift-6.0-nightly on linux.

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