patch 9.0.2088: Vim9: still allows abstract static methods
Problem: Vim9: still allows abstract static methods
(after v9.0.2084, v9.0.2085 and v9.0.2087)
Solution: Disallow abstract static methods
closes: #13479
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/vim9class.c b/src/vim9class.c
index f709c1f..e9131fe 100644
--- a/src/vim9class.c
+++ b/src/vim9class.c
@@ -1557,13 +1557,6 @@
break;
}
- p = skipwhite(pa + 8);
- if (STRNCMP(p, "def", 3) != 0 && STRNCMP(p, "static", 6) != 0)
- {
- emsg(_(e_abstract_must_be_followed_by_def));
- break;
- }
-
if (!is_class)
{
// "abstract" not supported in an interface
@@ -1577,6 +1570,13 @@
break;
}
+ p = skipwhite(pa + 8);
+ if (STRNCMP(p, "def", 3) != 0)
+ {
+ emsg(_(e_abstract_must_be_followed_by_def));
+ break;
+ }
+
abstract_method = TRUE;
}