diff src/vim9compile.c @ 28131:d8bf200cd761 v8.2.4590

patch 8.2.4590: Vim9: range type check has wrong offset Commit: https://github.com/vim/vim/commit/2995e5cf4eb9651827788e14f9f42ab34ce4c7e1 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Mar 18 21:41:47 2022 +0000 patch 8.2.4590: Vim9: range type check has wrong offset Problem: Vim9: range type check has wrong offset. Solution: Adjust offset for CHECKTYPE. Remove other type check.
author Bram Moolenaar <Bram@vim.org>
date Fri, 18 Mar 2022 22:45:02 +0100
parents dd2ed5345f20
children 088d8dc22045
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -1802,7 +1802,7 @@ compile_assign_unlet(
 	    {
 		type = get_type_on_stack(cctx, 1);
 		if (need_type(type, &t_number,
-					    -1, 0, cctx, FALSE, FALSE) == FAIL)
+					    -2, 0, cctx, FALSE, FALSE) == FAIL)
 		return FAIL;
 	    }
 	    type = get_type_on_stack(cctx, 0);