1
0
forked from aniani/vim

patch 8.2.4528: crash when using null_function for a partial

Problem:    Crash when using null_function for a partial.
Solution:   Don't call fname_trans_sid() with NULL. (closes #9908)
This commit is contained in:
Bram Moolenaar
2022-03-08 16:52:24 +00:00
parent 0b40d086b3
commit 673bcb10eb
3 changed files with 22 additions and 6 deletions

View File

@@ -3337,6 +3337,15 @@ def Test_partial_double_nested()
assert_equal(123, RefRef())
enddef
def Test_partial_null_function()
var lines =<< trim END
var d: dict<func> = {f: null_function}
var Ref = d.f
assert_equal('func', typename(Ref))
END
v9.CheckDefAndScriptSuccess(lines)
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()