comparison src/vim9compile.c @ 21683:bb4f55d20951 v8.2.1391

patch 8.2.1391: Vim9: no error for shadowing a script function Commit: https://github.com/vim/vim/commit/fa211f3c6d27cf962b28f10e3c18b12dde4d20c3 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 7 22:00:26 2020 +0200 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 https://github.com/vim/vim/issues/6652)
author Bram Moolenaar <Bram@vim.org>
date Fri, 07 Aug 2020 22:15:04 +0200
parents 877321650f7f
children 10866fd07595
comparison
equal deleted inserted replaced
21682:5e20df737eb4 21683:bb4f55d20951
5460 else if (!is_decl) 5460 else if (!is_decl)
5461 { 5461 {
5462 semsg(_(e_unknown_var), name); 5462 semsg(_(e_unknown_var), name);
5463 goto theend; 5463 goto theend;
5464 } 5464 }
5465 else if (check_defined(var_start, varlen, cctx) == FAIL)
5466 goto theend;
5465 } 5467 }
5466 } 5468 }
5467 5469
5468 if (declare_error) 5470 if (declare_error)
5469 { 5471 {