summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2023-11-19 18:59:52 +0100
committerChristian Brabandt <cb@256bit.org>2023-11-21 19:57:05 +0100
commit6b36645f07773d2b27c6662cd80a6567e07f75a0 (patch)
tree690d8df3f6ac6128a88972e4b0fc8264d7d0005c /src
parenta5218a7330cb14ddd9afa323ab03f4334e6a77a0 (diff)
patch 9.0.2119: remove dead-condition in ex_classv9.0.2119
Problem: remove dead-condition in ex_class() Solution: remove the extra condition The variable is_class must be true once we reach the ,---- | else if (has_static) `---- in line 1750, because we break out earlier if is_class is false in line 1598 of vim9class.c. And once 'has_static = TRUE', we must be in a class and there fore is_class is true. Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src')
-rw-r--r--src/version.c2
-rw-r--r--src/vim9class.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/version.c b/src/version.c
index 78446d57c4..9379c26e6d 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2119,
+/**/
2118,
/**/
2117,
diff --git a/src/vim9class.c b/src/vim9class.c
index 61492262ef..c0705ff3ca 100644
--- a/src/vim9class.c
+++ b/src/vim9class.c
@@ -1761,7 +1761,7 @@ early_ret:
if (parse_member(eap, line, varname, has_public,
&varname_end, &has_type, &type_list, &type,
- is_class ? &init_expr : NULL) == FAIL)
+ &init_expr) == FAIL)
break;
if (is_reserved_varname(varname, varname_end))
{