To: vim_dev@googlegroups.com Subject: Patch 8.2.1390 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1390 Problem: Vim9: type error after storing an option value. Solution: Drop the type after a STOREOPT instruction. (closes #6632) Files: src/vim9compile.c, src/testdir/test_vim9_script.vim *** ../vim-8.2.1389/src/vim9compile.c 2020-08-07 20:46:17.228567481 +0200 --- src/vim9compile.c 2020-08-07 21:24:18.614827805 +0200 *************** *** 1336,1342 **** isn_T *isn; RETURN_OK_IF_SKIP(cctx); ! if ((isn = generate_instr(cctx, ISN_STOREOPT)) == NULL) return FAIL; isn->isn_arg.storeopt.so_name = vim_strsave(name); isn->isn_arg.storeopt.so_flags = opt_flags; --- 1336,1342 ---- isn_T *isn; RETURN_OK_IF_SKIP(cctx); ! if ((isn = generate_instr_drop(cctx, ISN_STOREOPT, 1)) == NULL) return FAIL; isn->isn_arg.storeopt.so_name = vim_strsave(name); isn->isn_arg.storeopt.so_flags = opt_flags; *** ../vim-8.2.1389/src/testdir/test_vim9_script.vim 2020-08-07 20:46:17.228567481 +0200 --- src/testdir/test_vim9_script.vim 2020-08-07 21:27:54.386264219 +0200 *************** *** 422,427 **** --- 422,432 ---- assert_equal('one', v1) assert_equal('two', v2) assert_equal(['three'], vrem) + + [&ts, &sw] = [3, 4] + assert_equal(3, &ts) + assert_equal(4, &sw) + set ts=8 sw=4 enddef def Test_assignment_vim9script() *** ../vim-8.2.1389/src/version.c 2020-08-07 20:47:34.860362382 +0200 --- src/version.c 2020-08-07 21:25:41.122614704 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1390, /**/ -- Fingers not found - Pound head on keyboard to continue. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///