patch 8.2.2291: Vim9: cannot use "null" for v:null

Problem:    Vim9: cannot use "null" for v:null.
Solution:   Support "null" like "true" and "false". (closes #7495)
diff --git a/runtime/doc/vim9.txt b/runtime/doc/vim9.txt
index e13863a..b30db0b 100644
--- a/runtime/doc/vim9.txt
+++ b/runtime/doc/vim9.txt
@@ -1,4 +1,4 @@
-*vim9.txt*	For Vim version 8.2.  Last change: 2021 Jan 02
+*vim9.txt*	For Vim version 8.2.  Last change: 2021 Jan 03
 
 
 		  VIM REFERENCE MANUAL	  by Bram Moolenaar
@@ -640,11 +640,11 @@
 
 Simple types are string, float, special and bool.  For other types |string()|
 can be used.
-							*false* *true*
-In Vim9 script one can use "true" for v:true and "false" for v:false.  When
-converting a boolean to a string "false" and "true" are used, not "v:false"
-and "v:true" like in legacy script.  "v:none" and "v:null" are not changed,
-they are only used in JSON.
+							*false* *true* *null*
+In Vim9 script one can use "true" for v:true, "false" for v:false and "null"
+for v:null.  When converting a boolean to a string "false" and "true" are
+used, not "v:false" and "v:true" like in legacy script.  "v:none" is not
+changed, it is only used in JSON and has no equivalent in other languages.
 
 Indexing a string with [idx] or [idx, idx] uses character indexes instead of
 byte indexes. Example: >
diff --git a/src/evalvars.c b/src/evalvars.c
index c6b03e9..42ff828 100644
--- a/src/evalvars.c
+++ b/src/evalvars.c
@@ -2072,8 +2072,8 @@
     {
 	case VVAL_FALSE: return in_vim9script() ? "false" : "v:false";
 	case VVAL_TRUE:  return in_vim9script() ? "true" : "v:true";
+	case VVAL_NULL:  return in_vim9script() ? "null" : "v:null";
 	case VVAL_NONE:  return "v:none";
-	case VVAL_NULL:  return "v:null";
     }
     internal_error("get_var_special_name()");
     return "42";
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index d22ece2..e613f10 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -511,6 +511,8 @@
       assert_equal(true, v:none == v:none)
       assert_equal(false, v:none == v:null)
       assert_equal(true, g:anone == v:none)
+      assert_equal(true, null == v:null)
+      assert_equal(true, null == g:anull)
       assert_equal(false, v:none == g:anull)
 
       var nr0 = 0
@@ -1063,7 +1065,7 @@
 
       assert_equal('atrue', 'a' .. true)
       assert_equal('afalse', 'a' .. false)
-      assert_equal('av:null', 'a' .. v:null)
+      assert_equal('anull', 'a' .. v:null)
       assert_equal('av:none', 'a' .. v:none)
       if has('float')
         assert_equal('a0.123', 'a' .. 0.123)
@@ -1657,6 +1659,7 @@
       assert_equal(false, f)
 
       assert_equal(g:special_null, v:null)
+      assert_equal(g:special_null, null)
       assert_equal(g:special_none, v:none)
   END
   CheckDefAndScriptSuccess(lines)
diff --git a/src/version.c b/src/version.c
index 5585365..4a42d49 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    2291,
+/**/
     2290,
 /**/
     2289,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 412f0c9..3eae641 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3968,6 +3968,20 @@
 		    break;
 
 	/*
+	 * "null" constant
+	 */
+	case 'n':   if (STRNCMP(*arg, "null", 4) == 0
+						   && !eval_isnamec((*arg)[5]))
+		    {
+			*arg += 4;
+			rettv->v_type = VAR_SPECIAL;
+			rettv->vval.v_number = VVAL_NULL;
+		    }
+		    else
+			ret = NOTDONE;
+		    break;
+
+	/*
 	 * List: [expr, expr]
 	 */
 	case '[':   ret = compile_list(arg, cctx, ppconst);
@@ -5006,6 +5020,7 @@
 static char *reserved[] = {
     "true",
     "false",
+    "null",
     NULL
 };