comparison src/testdir/test_vim9_assign.vim @ 25459:9adaa0c056c7 v8.2.3266

patch 8.2.3266: Vim9: assignment with two indexes may check next line Commit: https://github.com/vim/vim/commit/e97976baa7a74fbbe0cfecd1943fe1c5f9dfba4f Author: Bram Moolenaar <Bram@vim.org> Date: Sun Aug 1 13:17:17 2021 +0200 patch 8.2.3266: Vim9: assignment with two indexes may check next line Problem: Vim9: assignment with two indexes may check next line. Solution: Limit the number of lines to avoid checking the next line when assiging to a LHS subscript. (closes #8660)
author Bram Moolenaar <Bram@vim.org>
date Sun, 01 Aug 2021 13:30:04 +0200
parents 21b70bab366c
children 0160aff01c32
comparison
equal deleted inserted replaced
25458:cf9a5512f4be 25459:9adaa0c056c7
463 var d3: dict<dict<dict<number>>> 463 var d3: dict<dict<dict<number>>>
464 d3.one = {} 464 d3.one = {}
465 d3.one.two = {} 465 d3.one.two = {}
466 d3.one.two.three = 123 466 d3.one.two.three = 123
467 assert_equal({one: {two: {three: 123}}}, d3) 467 assert_equal({one: {two: {three: 123}}}, d3)
468
469 # should not read the next line when generating "a.b"
470 var a = {}
471 a.b = {}
472 a.b.c = {}
473 ->copy()
468 474
469 lines =<< trim END 475 lines =<< trim END
470 var d3: dict<dict<number>> 476 var d3: dict<dict<number>>
471 d3.one = {} 477 d3.one = {}
472 d3.one.two = {} 478 d3.one.two = {}