File tree Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Expand file tree Collapse file tree 2 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -1015,17 +1015,23 @@ extension Signal.Event where Value == Never {
10151015 internal static func promoteValue< U> ( _: U . Type ) -> Transformation < U , Error > {
10161016 return { action, _ in
10171017 return { event in
1018- switch event {
1019- case . value:
1020- fatalError ( " Never is impossible to construct " )
1021- case let . failed( error) :
1022- action ( . failed( error) )
1023- case . completed:
1024- action ( . completed)
1025- case . interrupted:
1026- action ( . interrupted)
1027- }
1018+ action ( event. promoteValue ( ) )
10281019 }
10291020 }
10301021 }
10311022}
1023+
1024+ extension Signal . Event where Value == Never {
1025+ internal func promoteValue< U> ( ) -> Signal < U , Error > . Event {
1026+ switch event {
1027+ case . value:
1028+ fatalError ( " Never is impossible to construct " )
1029+ case let . failed( error) :
1030+ return . failed( error)
1031+ case . completed:
1032+ return . completed
1033+ case . interrupted:
1034+ return . interrupted
1035+ }
1036+ }
1037+ }
Original file line number Diff line number Diff line change @@ -1848,7 +1848,7 @@ extension Signal {
18481848 }
18491849
18501850 for (index, action) in builder. startHandlers. enumerated ( ) where !lifetime. hasEnded {
1851- lifetime += action ( index, strategy) { observer. send ( $0. map { _ in fatalError ( ) } ) }
1851+ lifetime += action ( index, strategy) { observer. send ( $0. promoteValue ( ) ) }
18521852 }
18531853 }
18541854 }
You can’t perform that action at this time.
0 commit comments