patch 9.1.0675: Patch v9.1.0674 causes problems
Commit:
https://github.com/vim/vim/commit/ded1677dd20ae795fadc8d6f3c01f012b1338fe1
Author: Christian Brabandt <[email protected]>
Date: Wed Aug 14 22:52:03 2024 +0200
patch 9.1.0675: Patch v9.1.0674 causes problems
Problem: Patch v9.1.0674 causes problems
Solution: Revert it for now
Revert "patch 9.1.0674: Vim9: compiling abstract method fails because of
missing return"
This reverts commit 7477861e0d1d4bb168a65585c49c66e57b3ec636.
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/src/testdir/test_vim9_class.vim b/src/testdir/test_vim9_class.vim
index 702ec2609..8791a5218 100644
--- a/src/testdir/test_vim9_class.vim
+++ b/src/testdir/test_vim9_class.vim
@@ -6264,27 +6264,6 @@ def Test_abstract_method()
assert_equal('foo', A.Foo())
END
v9.CheckSourceSuccess(lines)
-
- # Invoke method returning a value through the abstract class. See #15432.
- lines =<< trim END
- vim9script
-
- abstract class A
- abstract def String(): string
- endclass
-
- class B extends A
- def String(): string
- return 'B'
- enddef
- endclass
-
- def F(o: A)
- assert_equal('B', o.String())
- enddef
- F(B.new())
- END
- v9.CheckSourceSuccess(lines)
enddef
" Test for calling a class method from a subclass
diff --git a/src/version.c b/src/version.c
index 9bfca005d..f96c47301 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 675,
/**/
674,
/**/
diff --git a/src/vim9compile.c b/src/vim9compile.c
index de13f9bb4..ea305b7b3 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -4120,9 +4120,8 @@ compile_def_function(
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. Same goes for an abstract method.
- if ((ufunc->uf_class != NULL && IS_INTERFACE(ufunc->uf_class))
- || IS_ABSTRACT_METHOD(ufunc))
+ // No code is actually compiled.
+ if (ufunc->uf_class != NULL && IS_INTERFACE(ufunc->uf_class))
{
ufunc->uf_def_status = UF_NOT_COMPILED;
ret = OK;
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1seLKh-001k5Z-Qh%40256bit.org.