diff src/vim9compile.c @ 28901:11609f025219 v8.2.4973

patch 8.2.4973: Vim9: type error for list unpack mentions argument Commit: https://github.com/vim/vim/commit/bd3a9d2c946bae0427d7c9b9249716064935fb4e Author: Bram Moolenaar <Bram@vim.org> Date: Tue May 17 16:12:39 2022 +0100 patch 8.2.4973: Vim9: type error for list unpack mentions argument Problem: Vim9: type error for list unpack mentions argument. Solution: Mention variable. (close https://github.com/vim/vim/issues/10435)
author Bram Moolenaar <Bram@vim.org>
date Tue, 17 May 2022 17:15:03 +0200
parents bf013128ccf4
children 0e9642706a59
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -412,7 +412,8 @@ need_type_where(
     // If the actual type can be the expected type add a runtime check.
     if (!actual_is_const && ret == MAYBE && use_typecheck(actual, expected))
     {
-	generate_TYPECHECK(cctx, expected, offset, where.wt_index);
+	generate_TYPECHECK(cctx, expected, offset,
+					    where.wt_variable, where.wt_index);
 	return OK;
     }