If Swift gives you an error about a type not being assignable to itself (or its optional version) and you have a closure somewhere, check whether maybe the closure defaults to @​noescape. The Swift compiler doesn’t show that attribute even if it’s the reason for a type mismatch.