diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-07 00:52:56 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-07 00:53:04 -0400 |
| commit | 7e1fcb55b3e96524ce6f5620e2e98a3e3cc56608 (patch) | |
| tree | b0147340c2af1a74e84f1499133e5fbc28c162a7 /src/analyze.cpp | |
| parent | 1afbb53661e655906980668f0224804118a9862e (diff) | |
| download | zig-7e1fcb55b3e96524ce6f5620e2e98a3e3cc56608.tar.gz zig-7e1fcb55b3e96524ce6f5620e2e98a3e3cc56608.zip | |
implement cancel
all behavior tests passing in this branch
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 764b28ed45..cf71bd90f3 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3811,6 +3811,9 @@ static void add_async_error_notes(CodeGen *g, ErrorMsg *msg, ZigFn *fn) { } else if (fn->inferred_async_node->type == NodeTypeAwaitExpr) { add_error_note(g, msg, fn->inferred_async_node, buf_sprintf("await is a suspend point")); + } else if (fn->inferred_async_node->type == NodeTypeCancel) { + add_error_note(g, msg, fn->inferred_async_node, + buf_sprintf("cancel is a suspend point")); } else { zig_unreachable(); } |
