I am trying to transfer non-sendable variadic generics values to a function through the sending keyword. However, I don't seem to be able to use it correctly.
struct Runner {
func run<each Value>(_ value: repeat each Value) async {
// Some code here potentially transferring values as well
}
}
Where should I place the sending keyword? Is it supported at all? I can crash the compiler fairly easily depending on the placement of the keyword.
The parameter packs implementation hasn’t yet caught up with the fancier things you can do with function parameters, such as inout, ownership modifiers, ~Copyable or sending.
There are some common issues in the parser with parsing these specifiers in conjunction with repeat which should be easy to resolve, then we can at least diagnose the unsupported cases in a clean way.
Implementing the semantics for each one is of course a separate project in itself.