From: Bram Moolenaar Date: Tue, 8 Dec 2020 20:53:28 +0000 (+0100) Subject: patch 8.2.2114: Vim9: unreachable code in assignment X-Git-Tag: v8.2.2114 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=61265b4000b172ce891b3ded221bc0f624d9b55b;p=vim patch 8.2.2114: Vim9: unreachable code in assignment Problem: Vim9: unreachable code in assignment. Solution: Remove impossible condition and code. --- diff --git a/src/version.c b/src/version.c index 75590690d..b35208219 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2114, /**/ 2113, /**/ 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; }