mirror of
https://github.com/vim/vim.git
synced 2025-10-28 09:27:14 -04:00
patch 8.2.2146: Vim9: automatic conversion of number to string for dict key
Problem: Vim9: automatic conversion of number to string for dict key. Solution: Do not convert number to string. (closes #7474)
This commit is contained in:
@@ -951,6 +951,11 @@ eval_dict(char_u **arg, typval_T *rettv, evalarg_T *evalarg, int literal)
|
||||
}
|
||||
if (evaluate)
|
||||
{
|
||||
if (vim9script && check_for_string(&tvkey) == FAIL)
|
||||
{
|
||||
clear_tv(&tvkey);
|
||||
goto failret;
|
||||
}
|
||||
key = tv_get_string_buf_chk(&tvkey, buf);
|
||||
if (key == NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user