Improve error message for multi-valued global declarations not be allowed

This commit is contained in:
gingerBill
2020-09-12 16:04:02 +01:00
parent ccb7c3513b
commit 1fd1203d8b
2 changed files with 8 additions and 7 deletions

View File

@@ -2835,7 +2835,12 @@ Ast *parse_value_decl(AstFile *f, Array<Ast *> names, CommentGroup *docs) {
if (f->curr_proc == nullptr) {
if (values.count > 0 && names.count != values.count) {
syntax_error(values[0], "Expected %td expressions on the right hand side, got %td", names.count, values.count);
syntax_error(
values[0],
"Expected %td expressions on the right hand side, got %td\n"
"\tNote: Global declarations do not allow for multi-valued expressions",
names.count, values.count
);
}
}