Commit 6ff708e
committed
[Concurrency] Don't strip
of a closure in a `@preconcurrency` context.
Instead, downgrade any diagnostics about non-`Sendable` captures using the
`.limitBehaviorUntilSwiftVersion` mechanism like other preconcurrency errors
that are suppressed in minimal checking. Stripping `@Sendable` from closure
types actually changes the isolation of the closure, because non-`Sendable`
closures are isolated to the context they're formed in, which leads to bogus
dynamic assertion failures under `-enable-actor-data-race-checks`.@Sendable when determining the actor isolation1 parent 7df8812 commit 6ff708e
File tree
2 files changed
+42
-8
lines changed- lib/Sema
- test/Concurrency
2 files changed
+42
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
675 | 675 | | |
676 | 676 | | |
677 | 677 | | |
678 | | - | |
679 | | - | |
680 | | - | |
681 | | - | |
682 | 678 | | |
683 | 679 | | |
684 | 680 | | |
| |||
3692 | 3688 | | |
3693 | 3689 | | |
3694 | 3690 | | |
| 3691 | + | |
3695 | 3692 | | |
3696 | 3693 | | |
3697 | 3694 | | |
3698 | | - | |
3699 | | - | |
| 3695 | + | |
3700 | 3696 | | |
3701 | 3697 | | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
3702 | 3701 | | |
3703 | 3702 | | |
3704 | 3703 | | |
| |||
3738 | 3737 | | |
3739 | 3738 | | |
3740 | 3739 | | |
3741 | | - | |
| 3740 | + | |
3742 | 3741 | | |
3743 | 3742 | | |
3744 | 3743 | | |
| |||
3748 | 3747 | | |
3749 | 3748 | | |
3750 | 3749 | | |
3751 | | - | |
| 3750 | + | |
3752 | 3751 | | |
3753 | 3752 | | |
3754 | 3753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments