diff options
| author | Vexu <git@vexu.eu> | 2020-03-09 18:38:54 +0200 |
|---|---|---|
| committer | Vexu <git@vexu.eu> | 2020-03-09 18:43:09 +0200 |
| commit | 3fd2cd43678d52ca2f737d991edaddfd8b73c2a4 (patch) | |
| tree | 1a69d7283d69664631b6d07a87257355bb71e2eb /test/compile_errors.zig | |
| parent | 03c1431f9c0b651f3f1853f11112edc07555883d (diff) | |
| download | zig-3fd2cd43678d52ca2f737d991edaddfd8b73c2a4.tar.gz zig-3fd2cd43678d52ca2f737d991edaddfd8b73c2a4.zip | |
add LemonBoy's test
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 10 |
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", |
