]> granicus.if.org Git - vim/commitdiff
patch 8.2.2114: Vim9: unreachable code in assignment v8.2.2114
authorBram Moolenaar <Bram@vim.org>
Tue, 8 Dec 2020 20:53:28 +0000 (21:53 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 8 Dec 2020 20:53:28 +0000 (21:53 +0100)
Problem:    Vim9: unreachable code in assignment.
Solution:   Remove impossible condition and code.

src/version.c
src/vim9compile.c

index 75590690def04a948f5b5662dd27c686dfb937ea..b35208219090df90595ebd4db855d6b7a3ca2407 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2114,
 /**/
     2113,
 /**/
index 310e9e230ca69c57b17e6bf88d35b5d6e3aa0447..3ba2f87e024f868c9cd5998a38c39588e7b1a5f3 100644 (file)
@@ -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;
                }