diff src/vim9compile.c @ 20840:0600ab7b9f09 v8.2.0972

patch 8.2.0972: Vim9 script variable declarations need a type Commit: https://github.com/vim/vim/commit/c82a5b5da5eab15bc35115545b639fb590272ad7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jun 13 18:09:19 2020 +0200 patch 8.2.0972: Vim9 script variable declarations need a type Problem: Vim9 script variable declarations need a type. Solution: Make "let var: type" declare a script-local variable.
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Jun 2020 18:15:03 +0200
parents 9064044fd4f6
children bacc2ab11810
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -2255,7 +2255,8 @@ get_script_item_idx(int sid, char_u *nam
 }
 
 /*
- * Find "name" in imported items of the current script/
+ * Find "name" in imported items of the current script or in "cctx" if not
+ * NULL.
  */
     imported_T *
 find_imported(char_u *name, size_t len, cctx_T *cctx)
@@ -5012,12 +5013,12 @@ compile_assignment(char_u *arg, exarg_T 
     }
     else if (cmdidx == CMD_const)
     {
-	emsg(_("E1021: const requires a value"));
+	emsg(_(e_const_req_value));
 	goto theend;
     }
     else if (!has_type || dest == dest_option)
     {
-	emsg(_("E1022: type or initialization required"));
+	emsg(_(e_type_req));
 	goto theend;
     }
     else