Swift 5.7 seems to have regressed the ability of the compiler to actually detect errors, especially in closures. Often this message means there's another error somewhere in the closure, so a good approach is comment out the content and reenable it a line at a time. It should succeed and then start failing at some point so you can narrow down your error. In this case, one possibility is the use of Cont
in the closure type, as that's not the type of the continuation, which you really shouldn't need in the first place.
5 Likes