implement noasync scopes

This commit is contained in:
Vexu
2020-03-09 12:31:36 +02:00
parent 6f8d732599
commit 3618256c97
6 changed files with 77 additions and 2 deletions

View File

@@ -2,6 +2,15 @@ const tests = @import("tests.zig");
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();
\\}
\\fn foo() void {}
, &[_][]const u8{
"tmp.zig:2:13: error: async call in noasync scope",
});
cases.addTest("@TypeOf with no arguments",
\\export fn entry() void {
\\ _ = @TypeOf();