diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-02-15 21:17:56 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-15 21:17:56 +0000 |
commit | 8b716f5f2204f938769de283d43bcb2f77d403e7 (patch) | |
tree | b6e02ebcc3d6b23646b037e9b145b1aa147be8b1 /src/vim9compile.c | |
parent | 9fdde7992ab4c21517f447ca3d651b9ff4a770e8 (diff) | |
download | vim-git-8b716f5f2204f938769de283d43bcb2f77d403e7.tar.gz |
patch 8.2.4395: some code lines not covered by testsv8.2.4395
Problem: Some code lines not covered by tests.
Solution: Add a few more test cases. Fix getting more than one error for
invalid assignment.
Diffstat (limited to 'src/vim9compile.c')
-rw-r--r-- | src/vim9compile.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vim9compile.c b/src/vim9compile.c index 0eb41e4c1..74dc5e0b0 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -2420,7 +2420,7 @@ may_compile_assignment(exarg_T *eap, char_u **line, cctx_T *cctx) if (*eap->cmd == '[') { - // [var, var] = expr + // might be "[var, var] = expr" *line = compile_assignment(eap->cmd, eap, CMD_SIZE, cctx); if (*line == NULL) return FAIL; @@ -2958,7 +2958,10 @@ compile_def_function( case CMD_decrement: line = compile_assignment(p, &ea, ea.cmdidx, &cctx); if (line == p) + { + emsg(_(e_invalid_assignment)); line = NULL; + } break; case CMD_unlet: |