]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0675: Patch v9.1.0674 causes problems v9.1.0675
authorChristian Brabandt <cb@256bit.org>
Wed, 14 Aug 2024 20:52:03 +0000 (22:52 +0200)
committerChristian Brabandt <cb@256bit.org>
Wed, 14 Aug 2024 21:05:41 +0000 (23:05 +0200)
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 <cb@256bit.org>
src/testdir/test_vim9_class.vim
src/version.c
src/vim9compile.c

index 702ec2609f9be80c21c92a9dd5355be7044e531e..8791a5218d86059cfbf4ff4c0889a592f2ccb35c 100644 (file)
@@ -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
index 9bfca005ddb4f14dc91932a65b67bd101f3203d4..f96c473018a72828ef41ff2bb1c4b3d2af54edf4 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    675,
 /**/
     674,
 /**/
index de13f9bb49fd3a9149fd16a7b687f56ae78e37f5..ea305b7b34bb5213e7f2d1d507a2f6493c641af5 100644 (file)
@@ -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;