patch 8.2.3035: Vim9: crash when calling :def function with partial

Problem:    Vim9: crash when calling :def function with partial and return
            type is not set.
Solution:   When the return type is not set handle like the return type is
            unknown. (closes #8422)
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index de09baa..301a55c 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
@@ -1005,6 +1005,20 @@
       Foo()
   END
   CheckScriptSuccess(lines)
+
+  lines =<< trim END
+      vim9script
+      def g:TestFunc(f: func())
+      enddef
+      legacy call g:TestFunc({-> 0})
+      delfunc g:TestFunc
+
+      def g:TestFunc(f: func(number))
+      enddef
+      legacy call g:TestFunc({nr -> 0})
+      delfunc g:TestFunc
+  END
+  CheckScriptSuccess(lines)
 enddef
 
 " Default arg and varargs