]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0626: Vim9: need more tests with null objects v9.1.0626
authorErnie Rael <errael@raelity.com>
Fri, 26 Jul 2024 17:40:29 +0000 (19:40 +0200)
committerChristian Brabandt <cb@256bit.org>
Fri, 26 Jul 2024 17:40:29 +0000 (19:40 +0200)
Problem:  Vim9: need more tests with null objects
          (after v9.1.0620)
Solution: add one more test with null_object
          (Ernie Rael)

closes: #15360

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_vim9_class.vim
src/version.c

index b2ef0db98e738cae56ab18d320a96fb487e93817..56c7b99d943e045d905ff9fbdc77178f20fd5454 100644 (file)
@@ -686,6 +686,19 @@ def Test_object_not_set()
     X()
   END
   v9.CheckSourceFailure(lines, 'E1324: Using an Object as a String', 2)
+
+  # Use a null object variable that vim wants to force to number.
+  lines =<< trim END
+    vim9script
+
+    def X()
+      var o = null_object
+      var l = [ 1, o]
+      sort(l, 'N')
+    enddef
+    X()
+  END
+  v9.CheckSourceFailure(lines, 'E1324: Using an Object as a String', 3)
 enddef
 
 " Null object assignment and comparison
index a7b25391f20c9decc3f393a38c83216e5c876fe0..54fda947b76a127494a84dae55911713bd447a78 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    626,
 /**/
     625,
 /**/