0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.1391: Vim9: no error for shadowing a script function

Problem:    Vim9: no error for shadowing a script function.
Solution:   Check for already defined items. (closes #6652)
This commit is contained in:
Bram Moolenaar
2020-08-07 22:00:26 +02:00
parent 1c199f9c70
commit fa211f3c6d
3 changed files with 16 additions and 0 deletions

View File

@@ -5462,6 +5462,8 @@ compile_assignment(char_u *arg, exarg_T *eap, cmdidx_T cmdidx, cctx_T *cctx)
semsg(_(e_unknown_var), name);
goto theend;
}
else if (check_defined(var_start, varlen, cctx) == FAIL)
goto theend;
}
}