swift format fails when using new `sending` keyword
fabianfett opened this issue · 4 comments
fabianfett commented
swift format fails when using new sending
keyword.
Steps To Reproduce:
- Create a Foo.swift with following content and save:
struct Foo {
var bar: String
}
func whatever(_ foo: sending Foo) {
}
- 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.
ahoppen commented
Synced to Apple’s issue tracker as rdar://135336930
allevato commented
This looks like a swift-syntax issue.
@ahoppen, since SE-0430 was accepted for Swift 6.0, should the sendingArgsAndResults
experimental feature be removed and made unconditional?
ahoppen commented
Yes, that’s a swift-syntax issue. I’ll take it.