mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Typed throws] Record thrown error types and conversions in the AST
For any operation that can throw an error, such as calls, property accesses, and non-exhaustive do..catch statements, record the thrown error type along with the conversion from that thrown error to the error type expected in context, as appropriate. This will prevent later stages from having to re-compute the conversion sequences.
This commit is contained in:
@@ -333,7 +333,7 @@ deriveBodyDistributed_thunk(AbstractFunctionDecl *thunk, void *context) {
|
||||
auto *makeInvocationArgs = ArgumentList::createImplicit(C, {});
|
||||
auto makeInvocationCallExpr =
|
||||
CallExpr::createImplicit(C, makeInvocationExpr, makeInvocationArgs);
|
||||
makeInvocationCallExpr->setThrows(false);
|
||||
makeInvocationCallExpr->setThrows(nullptr);
|
||||
|
||||
auto invocationEncoderPB = PatternBindingDecl::createImplicit(
|
||||
C, StaticSpellingKind::None, invocationPattern, makeInvocationCallExpr,
|
||||
|
||||
Reference in New Issue
Block a user