Skip to content

Commit

Permalink
Swift 3.1 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
dileping committed Mar 29, 2017
1 parent a9e15e2 commit affe56a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions Sources/Future/Future.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import ExecutionContext

public protocol FutureProtocol : MovableExecutionContextTenantProtocol {
associatedtype Value
//Can not workaround as a protocol, because protocol can't set itself as a requirement
typealias SettledTenant = Future<Value>

init(value:Value)
init(error:Error)
Expand Down
2 changes: 1 addition & 1 deletion Sources/Future/Signal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Result
import Event

public extension SignalStream {
public func flatMap<A, F : FutureProtocol>(_ f:@escaping (Payload)->F) -> SignalStream<Result<A, AnyError>> where F.Value == A {
public func flatMap<A, F : FutureProtocol>(_ f:@escaping (Payload)->F) -> SignalStream<Result<A, AnyError>> where F.Value == A, F.SettledTenant == Future<A> {
let context = self.context
return SignalStream<Result<A, AnyError>>(context: context, advise: { fun in
self.chain { sig, payload in
Expand Down

0 comments on commit affe56a

Please sign in to comment.