diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-15 15:06:05 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-15 15:06:05 -0400 |
| commit | 55f5cee86b39bb2127a316f9b5d0abf532580cac (patch) | |
| tree | a9bce15a8899632cf527b980c8fc27280bd9dca0 /src/analyze.cpp | |
| parent | 13b5a4bf8ca65c569e6b28ca0e41d101d12d0ff1 (diff) | |
| download | zig-55f5cee86b39bb2127a316f9b5d0abf532580cac.tar.gz zig-55f5cee86b39bb2127a316f9b5d0abf532580cac.zip | |
fix error return traces for async calls of blocking functions
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index fc42abaf26..21289f24a8 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3819,6 +3819,11 @@ 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 == NodeTypeFnCallExpr && + fn->inferred_async_node->data.fn_call_expr.is_builtin) + { + add_error_note(g, msg, fn->inferred_async_node, + buf_sprintf("@frame() causes function to be async")); } else { add_error_note(g, msg, fn->inferred_async_node, buf_sprintf("suspends here")); |
