diff --git a/src-self-hosted/Module.zig b/src-self-hosted/Module.zig index da5e575587..5fc1f7d67e 100644 --- a/src-self-hosted/Module.zig +++ b/src-self-hosted/Module.zig @@ -1534,7 +1534,12 @@ fn astGenBuiltinCall(self: *Module, scope: *Scope, call: *ast.Node.BuiltinCall) const arg_count: ?usize = if (positionals.fields[0].field_type == []*zir.Inst) null else positionals.fields.len; if (arg_count) |some| { if (call.params_len != some) { - return self.failTok(scope, call.builtin_token, "expected {} parameter, found {}", .{ some, call.params_len }); + return self.failTok( + scope, + call.builtin_token, + "expected {} parameter{}, found {}", + .{ some, if (some == 1) "" else "s", call.params_len }, + ); } const params = call.params(); inline for (positionals.fields) |p, i| { diff --git a/src-self-hosted/zir.zig b/src-self-hosted/zir.zig index 92dbc66e2b..7b77575f55 100644 --- a/src-self-hosted/zir.zig +++ b/src-self-hosted/zir.zig @@ -290,6 +290,7 @@ pub const Inst = struct { pub const As = struct { pub const base_tag = Tag.as; + pub const builtin_name = "@as"; base: Inst, positionals: struct {