Commit 270f9e24dd

Andrew Kelley <andrew@ziglang.org>
2023-05-27 01:40:40
AstGen: generate tests with anyerror!void
rather than inferred error sets. This avoids extra unnecessary work for the compiler since inferred error sets are unique types.
1 parent e156c1c
Changed files (1)
src/AstGen.zig
@@ -4497,7 +4497,7 @@ fn testDecl(
         .cc_gz = null,
         .align_ref = .none,
         .align_gz = null,
-        .ret_ref = .void_type,
+        .ret_ref = .anyerror_void_error_union_type,
         .ret_gz = null,
         .section_ref = .none,
         .section_gz = null,
@@ -4510,7 +4510,7 @@ fn testDecl(
         .body_gz = &fn_block,
         .lib_name = 0,
         .is_var_args = false,
-        .is_inferred_error = true,
+        .is_inferred_error = false,
         .is_test = true,
         .is_extern = false,
         .is_noinline = false,