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 {
1944
1944
LLVM_FALLTHROUGH; // otherwise, perform checking
1945
1945
1946
1946
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
+
1947
1953
case ActorIsolationRestriction::CrossActorSelf:
1948
1954
// 'let'-bound decls with this isolation are OK, just check them.
1949
1955
if (auto wasLetBound = checkLetBoundVarDecl (component)) {
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ func tryKeyPathsMisc(d : Door) {
57
57
58
58
func tryKeyPathsFromAsync( ) async {
59
59
_ = \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
61
61
}
62
62
63
63
func tryNonSendable( ) {
@@ -68,7 +68,7 @@ func tryNonSendable() {
68
68
69
69
func tryKeypaths( ) {
70
70
_ = \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
72
72
73
73
_ = \Door . immutable
74
74
_ = \Door . unsafeIndependent
@@ -84,7 +84,7 @@ func tryKeypaths() {
84
84
let _ : PartialKeyPath < Door > = \. mutable // expected-error{{cannot form key path to actor-isolated property 'mutable'}}
85
85
let _ : AnyKeyPath = \Door . mutable // expected-error{{cannot form key path to actor-isolated property 'mutable'}}
86
86
87
- _ = \Door . globActor_mutable // expected-error{{cannot form key path to actor-isolated property 'globActor_mutable'}}
87
+ _ = \Door . globActor_mutable // okay for now
88
88
_ = \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
90
90
}
You can’t perform that action at this time.
0 commit comments