Skip to content

Commit 4206c26

Browse files
authored
Fixed the two inhabitable type guarding overloads.
1 parent e3ea639 commit 4206c26

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Sources/InhabitableTypeGuards.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ extension SignalProducer where Value == Never {
55
@discardableResult
66
@available(*, deprecated, message:"`Result.success` is never delivered - `Value` is inhabitable (Instantiation at runtime would trap)")
77
public func startWithResult(_ action: @escaping (Result<Value, Error>) -> Void) -> Disposable { observingInhabitableTypeError() }
8-
9-
@discardableResult
10-
@available(*, deprecated, message:"Observer is never called - `Value` is inhabitable (Instantiation at runtime would trap)")
11-
public func startWithValues(_ action: @escaping (Value) -> Void) -> Disposable { observingInhabitableTypeError() }
128
}
139

1410
extension SignalProducer where Value == Never, Error == NoError {
1511
@discardableResult
1612
@available(*, deprecated, message:"Observer is never called - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)")
1713
public func startWithResult(_ action: @escaping (Result<Value, Error>) -> Void) -> Disposable { observingInhabitableTypeError() }
14+
15+
@discardableResult
16+
@available(*, deprecated, message:"Observer is never called - `Value` is inhabitable (Instantiation at runtime would trap)")
17+
public func startWithValues(_ action: @escaping (Value) -> Void) -> Disposable { observingInhabitableTypeError() }
1818
}
1919

2020
extension SignalProducer where Error == NoError {
@@ -27,16 +27,16 @@ extension Signal where Value == Never {
2727
@discardableResult
2828
@available(*, deprecated, message:"`Result.success` is never delivered - `Value` is inhabitable (Instantiation at runtime would trap)")
2929
public func observeResult(_ action: @escaping (Result<Value, Error>) -> Void) -> Disposable? { observingInhabitableTypeError() }
30-
31-
@discardableResult
32-
@available(*, deprecated, message:"Observer is never called - `Value` is inhabitable (Instantiation at runtime would trap)")
33-
public func observeValues(_ action: @escaping (Value) -> Void) -> Disposable? { observingInhabitableTypeError() }
3430
}
3531

3632
extension Signal where Value == Never, Error == NoError {
3733
@discardableResult
3834
@available(*, deprecated, message:"Observer is never called - `Value` and `Error` are inhabitable (Instantiation at runtime would trap)")
3935
public func observeResult(_ action: @escaping (Result<Value, Error>) -> Void) -> Disposable? { observingInhabitableTypeError() }
36+
37+
@discardableResult
38+
@available(*, deprecated, message:"Observer is never called - `Value` is inhabitable (Instantiation at runtime would trap)")
39+
public func observeValues(_ action: @escaping (Value) -> Void) -> Disposable? { observingInhabitableTypeError() }
4040
}
4141

4242
extension Signal where Error == NoError {

0 commit comments

Comments
 (0)