0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

patch 9.1.1033: Vim9: compiling abstract method fails without return

Problem:  Vim9: compiling abstract method fails without return
          (Aliaksei Budavei)
Solution: don't require return for an abstract method
          (Ernie Rael)

fixes: #15432
related: ##15441
closes: #16469

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Ernie Rael
2025-01-18 17:26:39 +01:00
committed by Christian Brabandt
parent fef4be0d7a
commit 7c92e88894
3 changed files with 39 additions and 3 deletions

View File

@@ -4917,9 +4917,10 @@ compile_def_function(
goto erret;
ufunc->uf_args_visible = ufunc->uf_args.ga_len;
// Compiling a function in an interface is done to get the function type.
// No code is actually compiled.
if (ufunc->uf_class != NULL && IS_INTERFACE(ufunc->uf_class))
// Compiling an abstract method or a function in an interface is done to
// get the function type. No code is actually compiled.
if (ufunc->uf_class != NULL && (IS_INTERFACE(ufunc->uf_class)
|| IS_ABSTRACT_METHOD(ufunc)))
{
ufunc->uf_def_status = UF_NOT_COMPILED;
ret = OK;