summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-02-13 21:20:21 +0000
committerBram Moolenaar <Bram@vim.org>2022-02-13 21:20:21 +0000
commit0631bb4ed7674b88ba395daf59ed222f77bc4913 (patch)
tree39df24f8e70734e7552f33a7a21fc0db19bbf9ab
parentc87aa34dfd68e95e4b1aac96d2274fcd672753ac (diff)
downloadvim-git-0631bb4ed7674b88ba395daf59ed222f77bc4913.tar.gz
patch 8.2.4374: unreachable codev8.2.4374
Problem: Unreachable code. Solution: Remove outdated code lines.
-rw-r--r--src/version.c2
-rw-r--r--src/vim9compile.c22
2 files changed, 3 insertions, 21 deletions
diff --git a/src/version.c b/src/version.c
index 30547279d..efa15b834 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 */
/**/
+ 4374,
+/**/
4373,
/**/
4372,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 3a70f7a0f..2494d239f 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -291,27 +291,7 @@ variable_exists(char_u *name, size_t len, cctx_T *cctx)
static int
item_exists(char_u *name, size_t len, int cmd UNUSED, cctx_T *cctx)
{
- int is_global;
- char_u *p;
-
- if (variable_exists(name, len, cctx))
- return TRUE;
-
- // This is similar to what is in lookup_scriptitem():
- // Find a function, so that a following "->" works.
- // Require "(" or "->" to follow, "Cmd" is a user command while "Cmd()" is
- // a function call.
- p = skipwhite(name + len);
-
- if (name[len] == '(' || (p[0] == '-' && p[1] == '>'))
- {
- // Do not check for an internal function, since it might also be a
- // valid command, such as ":split" versus "split()".
- // Skip "g:" before a function name.
- is_global = (name[0] == 'g' && name[1] == ':');
- return find_func(is_global ? name + 2 : name, is_global) != NULL;
- }
- return FALSE;
+ return variable_exists(name, len, cctx);
}
/*