I’m wondering why the resultHandler block on RecoverableError.attemptRecovery(optionIndex, resultHandler:) is not marked @escaping?
I’m trying to invoke some recovering code that executes asynchronously, then reports if it was successful or not and I thought that this was the right strategy. As far as I can tell, without @escaping that method loses all it’s purpose and becomes essentially equivalent to attemptRecovery(optionIndex:). So, I’d like to ask. 1. Is it a bug or that method is non-escaping on purpose? 2. If it is a bug, is there a workaround that can be applied pending a fix in a future version of Swift? 3. If it was a deliberate decision, what's the supported method of asynchronously invoking error recovery code? Seeing that this wasn’t changed in Xcode 8.3b2, I think it unlikely that this was an oversight. Thanks, Elia Cereda
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users