mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
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 7477861e0d
.
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
@@ -6264,27 +6264,6 @@ def Test_abstract_method()
|
|||||||
assert_equal('foo', A.Foo())
|
assert_equal('foo', A.Foo())
|
||||||
END
|
END
|
||||||
v9.CheckSourceSuccess(lines)
|
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
|
enddef
|
||||||
|
|
||||||
" Test for calling a class method from a subclass
|
" Test for calling a class method from a subclass
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
675,
|
||||||
/**/
|
/**/
|
||||||
674,
|
674,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -4120,9 +4120,8 @@ compile_def_function(
|
|||||||
ufunc->uf_args_visible = ufunc->uf_args.ga_len;
|
ufunc->uf_args_visible = ufunc->uf_args.ga_len;
|
||||||
|
|
||||||
// Compiling a function in an interface is done to get the function type.
|
// Compiling a function in an interface is done to get the function type.
|
||||||
// No code is actually compiled. Same goes for an abstract method.
|
// No code is actually compiled.
|
||||||
if ((ufunc->uf_class != NULL && IS_INTERFACE(ufunc->uf_class))
|
if (ufunc->uf_class != NULL && IS_INTERFACE(ufunc->uf_class))
|
||||||
|| IS_ABSTRACT_METHOD(ufunc))
|
|
||||||
{
|
{
|
||||||
ufunc->uf_def_status = UF_NOT_COMPILED;
|
ufunc->uf_def_status = UF_NOT_COMPILED;
|
||||||
ret = OK;
|
ret = OK;
|
||||||
|
Reference in New Issue
Block a user