diff src/vim9compile.c @ 22292:3515f341e8ac v8.2.1695

patch 8.2.1695: Vim9: crash when using varargs type "any" Commit: https://github.com/vim/vim/commit/2f8cbc4b225ba707c3926070a3f133eb0473aed2 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 16 17:22:59 2020 +0200 patch 8.2.1695: Vim9: crash when using varargs type "any" Problem: Vim9: crash when using varargs type "any". Solution: Check if uf_va_type is &t_any. (closes https://github.com/vim/vim/issues/6957)
author Bram Moolenaar <Bram@vim.org>
date Wed, 16 Sep 2020 17:30:03 +0200
parents 6b385c2b9ff5
children 3f5f96a8dd83
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1430,8 +1430,8 @@ generate_CALL(cctx_T *cctx, ufunc_T *ufu
 		    continue;
 		expected = ufunc->uf_arg_types[i];
 	    }
-	    else if (ufunc->uf_va_type == NULL)
-		// possibly a lambda
+	    else if (ufunc->uf_va_type == NULL || ufunc->uf_va_type == &t_any)
+		// possibly a lambda or "...: any"
 		expected = &t_any;
 	    else
 		expected = ufunc->uf_va_type->tt_member;