patch 8.2.3382: crash when getting the type of a NULL partial
Problem: Crash when getting the type of a NULL partial.
Solution: Check for NULL. (closes #8260)
diff --git a/src/testdir/test_vim9_builtin.vim b/src/testdir/test_vim9_builtin.vim
index 434f477..c166a43 100644
--- a/src/testdir/test_vim9_builtin.vim
+++ b/src/testdir/test_vim9_builtin.vim
@@ -3679,6 +3679,15 @@
if has('float')
assert_equal('func([unknown], [unknown]): float', typename(function('pow')))
endif
+ assert_equal('func', test_null_partial()->typename())
+ assert_equal('list<unknown>', test_null_list()->typename())
+ assert_equal('dict<unknown>', test_null_dict()->typename())
+ if has('job')
+ assert_equal('job', test_null_job()->typename())
+ endif
+ if has('channel')
+ assert_equal('channel', test_null_channel()->typename())
+ endif
enddef
def Test_undofile()