comparison src/testdir/test_vim9_disassemble.vim @ 25605:6f13d9ea0d04 v8.2.3339

patch 8.2.3339: Vim9: cannot lock a member in a local dict Commit: https://github.com/vim/vim/commit/aacc966c5d0ed91e33ed32b08f17cf4df3ca1394 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Aug 13 19:40:51 2021 +0200 patch 8.2.3339: Vim9: cannot lock a member in a local dict Problem: Vim9: cannot lock a member in a local dict. Solution: Get the local dict from the stack and pass it to get_lval().
author Bram Moolenaar <Bram@vim.org>
date Fri, 13 Aug 2021 19:45:03 +0200
parents d8fb5bb88362
children 27cb2e79ccde
comparison
equal deleted inserted replaced
25604:5ad1d3061d62 25605:6f13d9ea0d04
583 '\d UNLET g:somevar\_s*' .. 583 '\d UNLET g:somevar\_s*' ..
584 'unlet! g:somevar\_s*' .. 584 'unlet! g:somevar\_s*' ..
585 '\d UNLET! g:somevar\_s*' .. 585 '\d UNLET! g:somevar\_s*' ..
586 'unlet $SOMEVAR\_s*' .. 586 'unlet $SOMEVAR\_s*' ..
587 '\d UNLETENV $SOMEVAR\_s*', 587 '\d UNLETENV $SOMEVAR\_s*',
588 res)
589 enddef
590
591 def s:LockLocal()
592 var d = {a: 1}
593 lockvar d.a
594 enddef
595
596 def Test_disassemble_locl_local()
597 var res = execute('disass s:LockLocal')
598 assert_match('<SNR>\d*_LockLocal\_s*' ..
599 'var d = {a: 1}\_s*' ..
600 '\d PUSHS "a"\_s*' ..
601 '\d PUSHNR 1\_s*' ..
602 '\d NEWDICT size 1\_s*' ..
603 '\d STORE $0\_s*' ..
604 'lockvar d.a\_s*' ..
605 '\d LOAD $0\_s*' ..
606 '\d LOCKUNLOCK lockvar d.a\_s*',
588 res) 607 res)
589 enddef 608 enddef
590 609
591 def s:ScriptFuncTry() 610 def s:ScriptFuncTry()
592 try 611 try