authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-19 01:24:19-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-19 01:24:19-05:00
log63383a8af8bf45b2de78967a2fe8773a5639d36b
tree4180a666503d075456d24064f05fd62f354711f4
parentc5ca0fe237e105b95c8edb7f80da899012e573f8
signaturelock-open Commit is signed but in an unrecognized format.

consistent capitalization of error message


2 files changed, 2 insertions(+), 2 deletions(-)

src/parser.cpp+1-1
...@@ -690,7 +690,7 @@ static AstNode *ast_parse_top_level_decl(ParseContext *pc, VisibMod visib_mod, B...@@ -690,7 +690,7 @@ static AstNode *ast_parse_top_level_decl(ParseContext *pc, VisibMod visib_mod, B
690 AstNode *res = fn_proto;690 AstNode *res = fn_proto;
691 if (body != nullptr) {691 if (body != nullptr) {
692 if (fn_proto->data.fn_proto.is_extern) {692 if (fn_proto->data.fn_proto.is_extern) {
693 ast_error(pc, first, "Extern functions have no body");693 ast_error(pc, first, "extern functions have no body");
694 }694 }
695 res = ast_create_node_copy_line_info(pc, NodeTypeFnDef, fn_proto);695 res = ast_create_node_copy_line_info(pc, NodeTypeFnDef, fn_proto);
696 res->data.fn_def.fn_proto = fn_proto;696 res->data.fn_def.fn_proto = fn_proto;
test/compile_errors.zig+1-1
...@@ -17,7 +17,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {...@@ -17,7 +17,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
17 \\ return a + b;17 \\ return a + b;
18 \\}18 \\}
19 , &[_][]const u8{19 , &[_][]const u8{
20 "tmp.zig:1:1: error: Extern functions have no body",20 "tmp.zig:1:1: error: extern functions have no body",
21 });21 });
2222
23 cases.addTest("duplicate field in anonymous struct literal",23 cases.addTest("duplicate field in anonymous struct literal",