diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-12-08 21:53:28 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-12-08 21:53:28 +0100 |
commit | 61265b4000b172ce891b3ded221bc0f624d9b55b (patch) | |
tree | 27afc2b520a5cc4b6da55e499fbd0d3beda9f781 | |
parent | 1b3e0727ce86ca4cfa47f8b5421d82ed47a9bec1 (diff) | |
download | vim-git-61265b4000b172ce891b3ded221bc0f624d9b55b.tar.gz |
patch 8.2.2114: Vim9: unreachable code in assignmentv8.2.2114
Problem: Vim9: unreachable code in assignment.
Solution: Remove impossible condition and code.
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9compile.c | 10 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/version.c b/src/version.c index 75590690d..b35208219 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2114, +/**/ 2113, /**/ 2112, diff --git a/src/vim9compile.c b/src/vim9compile.c index 310e9e230..3ba2f87e0 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -5483,16 +5483,6 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx) } } } - else if (name[1] == ':' && name[2] != NUL) - { - semsg(_(e_cannot_use_namespaced_variable), name); - goto theend; - } - else if (!is_decl) - { - semsg(_(e_unknown_variable_str), name); - goto theend; - } else if (check_defined(var_start, varlen, cctx) == FAIL) goto theend; } |