aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index 7021f81554..4434920224 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -4,11 +4,17 @@ const std = @import("std");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.addTest("combination of noasync and async",
\\export fn entry() void {
- \\ noasync async foo();
+ \\ noasync {
+ \\ const bar = async foo();
+ \\ suspend;
+ \\ resume bar;
+ \\ }
\\}
\\fn foo() void {}
, &[_][]const u8{
- "tmp.zig:2:13: error: async call in noasync scope",
+ "tmp.zig:3:21: error: async call in noasync scope",
+ "tmp.zig:4:9: error: suspend in noasync scope",
+ "tmp.zig:5:9: error: resume in noasync scope",
});
cases.addTest("@TypeOf with no arguments",