Skip to content

Commit 09db52b

Browse files
bjhomerDougGregor
authored andcommitted
Adjust tests new actor isolation rules in Swift 6.
`HasMainActorWrappedProp` was testing the inference rule that a type that uses actor-isolated property wrappers its itself isolated to that same actor. In Swift 6, that inference has been removed, so this test now verifies that the type is _not_ actor isolated. (cherry picked from commit bf472c2)
1 parent 0f7a206 commit 09db52b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/Concurrency/global_actor_inference_swift6.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct HasMainActorWrappedProp {
7878

7979
var plainStorage: Int
8080

81-
var computedProp: Int { 0 } // expected-note {{property declared here}}
81+
var computedProp: Int { 0 }
8282

8383
nonisolated func testErrors() {
8484
_ = thing // expected-error {{main actor-isolated property 'thing' can not be referenced from a non-isolated context}}
@@ -89,7 +89,7 @@ struct HasMainActorWrappedProp {
8989

9090
_ = plainStorage
9191

92-
_ = computedProp // expected-error {{main actor-isolated property 'computedProp' can not be referenced from a non-isolated context}}
92+
_ = computedProp
9393
}
9494
}
9595

0 commit comments

Comments
 (0)