patch 8.2.0331: internal error when using test_void() and test_unknown()

Problem:    Internal error when using test_void() and test_unknown().
            (Dominique Pelle)
Solution:   Give a normal error.
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 327350b..6f3b81a 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -58,6 +58,9 @@
 
   call assert_equal(0, empty(function('Test_empty')))
   call assert_equal(0, empty(function('Test_empty', [0])))
+
+  call assert_fails("call empty(test_void())", 'E685:')
+  call assert_fails("call empty(test_unknown())", 'E685:')
 endfunc
 
 func Test_len()
diff --git a/src/testdir/test_vimscript.vim b/src/testdir/test_vimscript.vim
index 7a49b57..cac3be5 100644
--- a/src/testdir/test_vimscript.vim
+++ b/src/testdir/test_vimscript.vim
@@ -1165,6 +1165,8 @@
     call assert_equal(v:t_none, type(v:none))
     call assert_equal(v:t_none, type(v:null))
 
+    call assert_fails("call type(test_void())", 'E685:')
+    call assert_fails("call type(test_unknown())", 'E685:')
 
     call assert_equal(0, 0 + v:false)
     call assert_equal(1, 0 + v:true)