mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Async Refactoring] Remove assertions for nil result values in async wrapper
Since we aren’t checking that all result arguments are `nil` if there was an `error` in all the other refactorings, also remove the assertions in the async wrapper.
This commit is contained in:
@@ -6082,17 +6082,9 @@ private:
|
||||
OS << *ErrName << " " << tok::equal << " " << *ErrName << " ";
|
||||
OS << tok::l_brace << "\n";
|
||||
for (auto Idx : indices(SuccessParamNames)) {
|
||||
auto &Name = SuccessParamNames[Idx];
|
||||
auto ParamTy = SuccessParams[Idx].getParameterType();
|
||||
if (!HandlerDesc.shouldUnwrap(ParamTy))
|
||||
continue;
|
||||
|
||||
// assert(res == nil, "Expected nil-success param 'res' for non-nil
|
||||
// error")
|
||||
OS << "assert" << tok::l_paren << Name << " == " << tok::kw_nil;
|
||||
OS << tok::comma << " \"Expected nil success param '" << Name;
|
||||
OS << "' for non-nil error\"";
|
||||
OS << tok::r_paren << "\n";
|
||||
}
|
||||
|
||||
// continuation.resume(throwing: err)
|
||||
|
||||
Reference in New Issue
Block a user