1
0
forked from aniani/vim

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 #6507)
This commit is contained in:
Bram Moolenaar
2020-07-22 21:45:14 +02:00
parent 0f60e80f9b
commit 4cdb13ce81
7 changed files with 105 additions and 74 deletions

View File

@@ -557,7 +557,7 @@ check_script_var_type(typval_T *dest, typval_T *value, char_u *name)
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");