File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1944,6 +1944,12 @@ namespace {
19441944 LLVM_FALLTHROUGH; // otherwise, perform checking
19451945
19461946 case ActorIsolationRestriction::GlobalActor:
1947+ // Disable global actor checking for now.
1948+ if (!ctx.LangOpts .isSwiftVersionAtLeast (6 ))
1949+ break ;
1950+
1951+ LLVM_FALLTHROUGH; // otherwise, it's invalid so diagnose it.
1952+
19471953 case ActorIsolationRestriction::CrossActorSelf:
19481954 // 'let'-bound decls with this isolation are OK, just check them.
19491955 if (auto wasLetBound = checkLetBoundVarDecl (component)) {
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ func tryKeyPathsMisc(d : Door) {
5757
5858func tryKeyPathsFromAsync( ) async {
5959 _ = \Door . unsafeGlobActor_immutable
60- _ = \Door . unsafeGlobActor_mutable // expected-error{{cannot form key path to actor-isolated property 'unsafeGlobActor_mutable'}}
60+ _ = \Door . unsafeGlobActor_mutable // okay for now
6161}
6262
6363func tryNonSendable( ) {
@@ -68,7 +68,7 @@ func tryNonSendable() {
6868
6969func tryKeypaths( ) {
7070 _ = \Door . unsafeGlobActor_immutable
71- _ = \Door . unsafeGlobActor_mutable // expected-error{{cannot form key path to actor-isolated property 'unsafeGlobActor_mutable'}}
71+ _ = \Door . unsafeGlobActor_mutable // okay for now
7272
7373 _ = \Door . immutable
7474 _ = \Door . unsafeIndependent
@@ -84,7 +84,7 @@ func tryKeypaths() {
8484 let _ : PartialKeyPath < Door > = \. mutable // expected-error{{cannot form key path to actor-isolated property 'mutable'}}
8585 let _ : AnyKeyPath = \Door . mutable // expected-error{{cannot form key path to actor-isolated property 'mutable'}}
8686
87- _ = \Door . globActor_mutable // expected-error{{cannot form key path to actor-isolated property 'globActor_mutable'}}
87+ _ = \Door . globActor_mutable // okay for now
8888 _ = \Door . [ 0 ] // expected-error{{cannot form key path to actor-isolated subscript 'subscript(_:)'}}
89- _ = \Door . [ " hello " ] // expected-error{{cannot form key path to actor-isolated subscript 'subscript(_:)'}}
89+ _ = \Door . [ " hello " ] // okay for now
9090}
You can’t perform that action at this time.
0 commit comments