diff src/vim9compile.c @ 20419:d54dfb5f12db v8.2.0764

patch 8.2.0764: Vim9: assigning to option not fully tested Commit: https://github.com/vim/vim/commit/a6e67e4f41386c3e6eab7e047671c6d32f6cb0dc Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 15 23:36:40 2020 +0200 patch 8.2.0764: Vim9: assigning to option not fully tested Problem: Vim9: assigning to option not fully tested. Solution: Add more test cases. Allow using any type for assignment.
author Bram Moolenaar <Bram@vim.org>
date Fri, 15 May 2020 23:45:04 +0200
parents c225be44692a
children 489cb75c76b6
line wrap: on
line diff
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3490,7 +3490,7 @@ compile_subscript(
 	    type_T	**typep;
 
 	    // list index: list[123]
-	    // list member: dict[key]
+	    // dict member: dict[key]
 	    // TODO: blob index
 	    // TODO: more arguments
 	    // TODO: recognize list or dict at runtime
@@ -4999,8 +4999,8 @@ compile_assignment(char_u *arg, exarg_T 
 			goto theend;
 		}
 	    }
-	    else if (*p != '=' && check_type(member_type, stacktype, TRUE)
-								       == FAIL)
+	    else if (*p != '=' && need_type(stacktype, member_type, -1,
+								 cctx) == FAIL)
 		goto theend;
 	}
     }