False positive warning during the code analysis performed by SE-0430 "transferring" parameters and result values #73315
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
concurrency
Feature: umbrella label for concurrency language features
Description
The compiler emits false positive warnings whenever a value is transferred twice.
Reproduction
Expected behavior
The compiler emits no diagnostic
Environment
Additional information
I discovered this issue while exploring the possibilities evoked in this forum post.
I assumed that DispatchQueue.async WILL be modified so that it accepts a transferred closure instead of a Sendable closure.
I have some code that performs double async dispatch in order to avoid thread explosion (technique discussed in this forum post).
And that's how I had to transfer a closure twice, saw a warning, and opened this issue.
The text was updated successfully, but these errors were encountered: