Skip to content

Commit 7a096ed

Browse files
committed
workaround for swiftlang/swift#77315 compiler crash
1 parent 5901368 commit 7a096ed

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Sources/AsyncSubjects/AsyncCurrentValueSubject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public final class AsyncCurrentValueSubject<Element>: AsyncSubject where Element
9191
func handleNewConsumer() -> (iterator: AsyncBufferedChannel<Element>.Iterator, unregister: @Sendable () -> Void) {
9292
let asyncBufferedChannel = AsyncBufferedChannel<Element>()
9393

94-
let (terminalState, current) = self.state.withCriticalRegion { state -> (Termination?, Element) in
94+
let (terminalState, current) = self.state.withCriticalRegion { state in
9595
(state.terminalState, state.current)
9696
}
9797

Sources/AsyncSubjects/AsyncReplaySubject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public final class AsyncReplaySubject<Element>: AsyncSubject where Element: Send
7575
func handleNewConsumer() -> (iterator: AsyncBufferedChannel<Element>.Iterator, unregister: @Sendable () -> Void) {
7676
let asyncBufferedChannel = AsyncBufferedChannel<Element>()
7777

78-
let (terminalState, elements) = self.state.withCriticalRegion { state -> (Termination?, [Element]) in
78+
let (terminalState, elements) = self.state.withCriticalRegion { state in
7979
(state.terminalState, state.buffer)
8080
}
8181

Sources/AsyncSubjects/AsyncThrowingCurrentValueSubject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public final class AsyncThrowingCurrentValueSubject<Element, Failure: Error>: As
9797
) -> (iterator: AsyncThrowingBufferedChannel<Element, Error>.Iterator, unregister: @Sendable () -> Void) {
9898
let asyncBufferedChannel = AsyncThrowingBufferedChannel<Element, Error>()
9999

100-
let (terminalState, current) = self.state.withCriticalRegion { state -> (Termination?, Element) in
100+
let (terminalState, current) = self.state.withCriticalRegion { state in
101101
(state.terminalState, state.current)
102102
}
103103

Sources/AsyncSubjects/AsyncThrowingReplaySubject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public final class AsyncThrowingReplaySubject<Element, Failure: Error>: AsyncSub
8080
) -> (iterator: AsyncThrowingBufferedChannel<Element, Error>.Iterator, unregister: @Sendable () -> Void) {
8181
let asyncBufferedChannel = AsyncThrowingBufferedChannel<Element, Error>()
8282

83-
let (terminalState, elements) = self.state.withCriticalRegion { state -> (Termination?, [Element]) in
83+
let (terminalState, elements) = self.state.withCriticalRegion { state in
8484
(state.terminalState, state.buffer)
8585
}
8686

0 commit comments

Comments
 (0)