]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.2119: remove dead-condition in ex_class v9.0.2119
authorChristian Brabandt <cb@256bit.org>
Sun, 19 Nov 2023 17:59:52 +0000 (18:59 +0100)
committerChristian Brabandt <cb@256bit.org>
Tue, 21 Nov 2023 18:57:05 +0000 (19:57 +0100)
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>
src/version.c
src/vim9class.c

index 78446d57c42fba9a173a27a620972b7e3ed30cfd..9379c26e6dced394869f945d2c59da4654a71db7 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2119,
 /**/
     2118,
 /**/
index 61492262ef91361b20acb6e2620daea85fc43244..c0705ff3cad08e297ecb99d8d162dddfdafe36f3 100644 (file)
@@ -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))
            {