Commit 02faa8f
committed
[Concurrency] Don't attempt to diagnose
If the property comes from a different module the compiler shouldn't
attempt to diagnose `GlobalIsolation` problems based in the current
module flags otherwise it would create issues when i.e. a variable/property
from a module built with `-swift-version 5` that gets referenced
by a module that is built with `-swift-version 6` that has stricter
local concurrency requirements.
See https://forums.swift.org/t/swift-6-language-mode-being-passed-to-dependencies/72622
for further discussion.
A better solution would be to move the check to `ActorIsolationChecker`
or `DeclChecker` but that would be too risky for 6.0.
(cherry picked from commit aae15c3)GlobalConcurrency issues with deserialized variable/properties1 parent d089f83 commit 02faa8f
File tree
2 files changed
+44
-1
lines changed- lib/Sema
- test/Concurrency
2 files changed
+44
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5055 | 5055 | | |
5056 | 5056 | | |
5057 | 5057 | | |
5058 | | - | |
| 5058 | + | |
| 5059 | + | |
| 5060 | + | |
| 5061 | + | |
| 5062 | + | |
5059 | 5063 | | |
5060 | 5064 | | |
5061 | 5065 | | |
| |||
Lines changed: 39 additions & 0 deletions
| 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 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments