[Concurrency] Isolated global 'let's are not safe to access across actors.

This commit is contained in:
Holly Borla
2023-11-02 10:00:21 -07:00
parent b74e4a2e20
commit 04be278344
4 changed files with 11 additions and 4 deletions

View File

@@ -49,7 +49,7 @@ func from_isolated_concrete(_ x: isolated A) async {
actor Act {
var i = 0 // expected-note {{mutation of this property is only permitted within the actor}}
}
let act = Act()
nonisolated let act = Act()
func bad() async {
// expected-warning@+2 {{no 'async' operations occur within 'await' expression}}