You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 3, 2022. It is now read-only.
To illustrate the problem I've modified one of the methods in the test suite, substituting NSError for NoError
func testFlatMapByPassingFunction(){lete=self.expectation()func toString(n:Int)->Future<String,NSError>{returnFuture<String,NSError>(value:"\(n)")}letn=1letflatMapped=Future<Int,NoError>(value: n).flatMap(toString)
flatMapped.onSuccess{ s inXCTAssertEqual(s,"\(n)","strings are not equal")
e.fulfill()}self.waitForExpectationsWithTimeout(2, handler:nil)}
Which result in the error: Cannot invoke 'flatMap' with an argument list of type '((Int) -> Future<String, NSError>)'