Skip to content

Xcode 9.3 & Swift 4.1

Compare
Choose a tag to compare
@s4cha s4cha released this 04 Apr 18:22
· 75 commits to master since this release

Big Thanks to @casademora for this release 👏 🎉

This introduces breaking changes.

Promises calls like this:

func foo() -> Promise<Void> {
    return Promise { resolve, _ in
      // code...
  }
}

Will now need to be disambiguated like so:

func foo() -> Promise<Void> {
    return Promise { (resolve: @escaping () -> Void, _) in
      // code...
  }
}

Indeed, Promise<T> and Promise<Void> share the same initializer with different param types which is now considered ambiguous. Until we find a workaround, explicitly declaring types will be needed.