1
0
forked from aniani/vim

patch 8.2.4404: Vim9: some code not covered by tests

Problem:    Vim9: some code not covered by tests.
Solution:   Add a few specific test cases.
This commit is contained in:
Bram Moolenaar
2022-02-16 21:48:25 +00:00
parent 9437737833
commit cd1cda2f87
4 changed files with 151 additions and 0 deletions

View File

@@ -3226,6 +3226,14 @@ def Test_partial_call()
v9.CheckScriptFailure(lines, 'E1235:')
enddef
def Test_partial_double_nested()
var idx = 123
var Get = () => idx
var Ref = function(Get, [])
var RefRef = function(Ref, [])
assert_equal(123, RefRef())
enddef
" Using "idx" from a legacy global function does not work.
" This caused a crash when called from legacy context.
func Test_partial_call_fails()