Closed jc-paris closed 8 years ago
Swift is not able to infer the type of multi-line closures. You'll need to something like this:
let future = Future<Int, Error>()
future.flatMap { i -> Future<String, Error> in
let f = Future<String, Error>()
return f
}
Oh right ! Compilation error got me wrong. It's a tricky one !
Hi Thomas,
I run into a strange issue with
.flatMap
that I don't succeed to solve. I wrote some sample code to reproduce the error:This compile:
This strangely doesn't compile:
Neither does this one:
Any explication ? Is it a BrightFutures issue or me doesn't using it right ?