diff src/vim9instr.c @ 26723:c3cffd372c6f v8.2.3890

patch 8.2.3890: Vim9: type check for using v: variables is basic Commit: https://github.com/vim/vim/commit/d787e40fdbe6f4d8bf47d36186c1d9d51c29b853 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 24 21:36:12 2021 +0000 patch 8.2.3890: Vim9: type check for using v: variables is basic Problem: Vim9: type check for using v: variables is basic. Solution: Specify a more precise type.
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 Dec 2021 22:45:03 +0100
parents 38a270fdd3f6
children b969fdb8cd46
line wrap: on
line diff
--- a/src/vim9instr.c
+++ b/src/vim9instr.c
@@ -946,8 +946,7 @@ generate_LOADV(
 	    semsg(_(e_variable_not_found_str), name);
 	return FAIL;
     }
-    type = typval2type_vimvar(get_vim_var_tv(vidx), cctx->ctx_type_list);
-
+    type = get_vim_var_type(vidx, cctx->ctx_type_list);
     return generate_LOAD(cctx, ISN_LOADV, vidx, NULL, type);
 }