Mercurial > vim
diff src/vim9script.c @ 21443:66386ca8a69f v8.2.1272
patch 8.2.1272: Vim9: type not checked if declaration also assigns value
Commit: https://github.com/vim/vim/commit/4cdb13ce81309b62b636f2c614241959174d3fef
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jul 22 21:45:14 2020 +0200
patch 8.2.1272: Vim9: type not checked if declaration also assigns value
Problem: Vim9: type not checked if declaration also assigns value.
Solution: Check the type. (issue https://github.com/vim/vim/issues/6507)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 22 Jul 2020 22:00:04 +0200 |
parents | 8d1d11afd8c8 |
children | 78734d1f6639 |
line wrap: on
line diff
--- a/src/vim9script.c +++ b/src/vim9script.c @@ -557,7 +557,7 @@ check_script_var_type(typval_T *dest, ty semsg(_(e_readonlyvar), name); return FAIL; } - return check_type(sv->sv_type, typval2type(value), TRUE); + return check_typval_type(sv->sv_type, value); } } iemsg("check_script_var_type(): not found");