mirror of
https://github.com/vim/vim.git
synced 2025-10-01 04:54:07 -04:00
patch 8.2.2558: no error if a lambda argument shadows a variable
Problem: No error if a lambda argument shadows a variable. Solution: Check that the argument name shadows a local, argument or script variable. (closes #7898)
This commit is contained in:
@@ -1119,7 +1119,7 @@ def Test_vim9_import_export()
|
||||
import exported from './Xexport.vim'
|
||||
END
|
||||
writefile(import_already_defined, 'Ximport.vim')
|
||||
assert_fails('source Ximport.vim', 'E1073:', '', 3, 'Ximport.vim')
|
||||
assert_fails('source Ximport.vim', 'E1054:', '', 3, 'Ximport.vim')
|
||||
|
||||
# try to import something that is already defined
|
||||
import_already_defined =<< trim END
|
||||
@@ -1128,7 +1128,7 @@ def Test_vim9_import_export()
|
||||
import * as exported from './Xexport.vim'
|
||||
END
|
||||
writefile(import_already_defined, 'Ximport.vim')
|
||||
assert_fails('source Ximport.vim', 'E1073:', '', 3, 'Ximport.vim')
|
||||
assert_fails('source Ximport.vim', 'E1054:', '', 3, 'Ximport.vim')
|
||||
|
||||
# try to import something that is already defined
|
||||
import_already_defined =<< trim END
|
||||
@@ -1137,7 +1137,7 @@ def Test_vim9_import_export()
|
||||
import {exported} from './Xexport.vim'
|
||||
END
|
||||
writefile(import_already_defined, 'Ximport.vim')
|
||||
assert_fails('source Ximport.vim', 'E1073:', '', 3, 'Ximport.vim')
|
||||
assert_fails('source Ximport.vim', 'E1054:', '', 3, 'Ximport.vim')
|
||||
|
||||
# try changing an imported const
|
||||
var import_assign_to_const =<< trim END
|
||||
|
Reference in New Issue
Block a user