File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,13 @@ public enum AsyncPhase<Success, Failure: Error> {
2929 /// returned value as a success, or thrown error as a failure.
3030 ///
3131 /// - Parameter body: A async throwing closure to evaluate.
32- public init ( catching body: @Sendable ( ) async throws ( Failure ) -> Success ) async {
32+ public init (
33+ // Adopt SE-0420 Inheritance of actor isolation instead of adding @Sendable
34+ // to the body closure once the compiler crash that happens with Swift 6.0
35+ // when used in an initializer is solved.
36+ // isolation: isolated (any Actor)? = #isolation,
37+ catching body: @Sendable ( ) async throws ( Failure ) -> Success
38+ ) async {
3339 do {
3440 let value = try await body ( )
3541 self = . success( value)
You can’t perform that action at this time.
0 commit comments