mirror of
https://github.com/vim/vim.git
synced 2025-10-07 05:54:16 -04:00
patch 8.2.4526: Vim9: cannot set variables to a null value
Problem: Vim9: cannot set variables to a null value. Solution: Add null_list, null_job, etc.
This commit is contained in:
@@ -157,12 +157,28 @@ endfunc
|
||||
|
||||
func Test_loop_over_null_list()
|
||||
let lines =<< trim END
|
||||
VAR null_list = test_null_list()
|
||||
for i in null_list
|
||||
VAR nulllist = test_null_list()
|
||||
for i in nulllist
|
||||
call assert_report('should not get here')
|
||||
endfor
|
||||
END
|
||||
call v9.CheckLegacyAndVim9Success(lines)
|
||||
|
||||
let lines =<< trim END
|
||||
var nulllist = null_list
|
||||
for i in nulllist
|
||||
call assert_report('should not get here')
|
||||
endfor
|
||||
END
|
||||
call v9.CheckDefAndScriptSuccess(lines)
|
||||
|
||||
let lines =<< trim END
|
||||
let nulllist = null_list
|
||||
for i in nulllist
|
||||
call assert_report('should not get here')
|
||||
endfor
|
||||
END
|
||||
call v9.CheckScriptFailure(lines, 'E121: Undefined variable: null_list')
|
||||
endfunc
|
||||
|
||||
func Test_setreg_null_list()
|
||||
|
Reference in New Issue
Block a user