0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.3954: Vim9: no error for shadowing if script var is declared later

Problem:    Vim9: no error for shadowing if script var is declared later.
Solution:   Check argument names when compiling a function.
This commit is contained in:
Bram Moolenaar
2021-12-31 14:06:45 +00:00
parent 6ad84ab3e4
commit 9a015111a5
4 changed files with 48 additions and 3 deletions

View File

@@ -853,8 +853,8 @@ def Test_assignment_partial()
var nres: any
var sres: any
def Func(n: number, s = '')
nres = n
def Func(nr: number, s = '')
nres = nr
sres = s
enddef
@@ -869,7 +869,7 @@ def Test_assignment_partial()
lines =<< trim END
vim9script
def Func(n: number, s = '')
def Func(nr: number, s = '')
enddef
var n: number