You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[concurrency] Change execution to override inferred global actor isolation to match nonisolated.
Specifically, we were attempting to diagnose cases like the following:
```swift
@mainactor protocol P {
func foo() async
}
struct S : P {
@execution(concurrent) func foo() async {}
}
```
This was just an attempt to be more conservative. After some conversations, it
came up that nonisolated does not work that way... that is the compiler will
accept the following and just hop in the protocol witness thunk:
```swift
@mainactor protocol P {
func foo() async
}
struct S : P {
nonisolated func foo() async {}
}
```
// expected-error@-1 {{cannot use '@execution(concurrent)' on instance method 'testIsolationAny(arg:)' because it has a dynamically isolated parameter: 'arg'}}
0 commit comments