diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-02-05 20:31:18 +0100 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2020-02-05 20:31:18 +0100 |
| commit | 21932a0ef25a7055cd3c0850fa58c2fda2ba383b (patch) | |
| tree | bc154b72c1162381e4d0b560b43e68507b442997 /src/parser.cpp | |
| parent | b022db16ece48f2cdec47c5716601fec2fc07ef4 (diff) | |
| download | zig-21932a0ef25a7055cd3c0850fa58c2fda2ba383b.tar.gz zig-21932a0ef25a7055cd3c0850fa58c2fda2ba383b.zip | |
Fix edge case in cast between fn with varargs
* Prevent the next_param_index to become greater than the param_count
one as it's expected by every other function.
* Fix a typo in a error message.
Closes #4381
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index a4dc324b2f..0da7aac639 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -806,7 +806,7 @@ static AstNode *ast_parse_fn_proto(ParseContext *pc) { if (param_decl->data.param_decl.is_var_args) res->data.fn_proto.is_var_args = true; if (i != params.length - 1 && res->data.fn_proto.is_var_args) - ast_error(pc, first, "Function prototype have varargs as a none last paramter."); + ast_error(pc, first, "Function prototype have varargs as a none last parameter."); } return res; } |
