comparison src/testdir/test_vim9_disassemble.vim @ 23557:f50ee1ae4d9b v8.2.2321

patch 8.2.2321: Vim9: cannot nest closures Commit: https://github.com/vim/vim/commit/ab360526ef653b139f4b007a0efbdb3410c8fb4b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 10 14:02:28 2021 +0100 patch 8.2.2321: Vim9: cannot nest closures Problem: Vim9: cannot nest closures. Solution: Add the nesting level to ISN_LOADOUTER and ISN_STOREOUTER. (closes #7150, closes #7635)
author Bram Moolenaar <Bram@vim.org>
date Sun, 10 Jan 2021 14:15:04 +0100
parents f90e429453fd
children 8c5374ec8a3d
comparison
equal deleted inserted replaced
23556:9f919f241f46 23557:f50ee1ae4d9b
565 def Test_disassemble_closure() 565 def Test_disassemble_closure()
566 CreateRefs() 566 CreateRefs()
567 var res = execute('disass g:Append') 567 var res = execute('disass g:Append')
568 assert_match('<lambda>\d\_s*' .. 568 assert_match('<lambda>\d\_s*' ..
569 'local ..= arg\_s*' .. 569 'local ..= arg\_s*' ..
570 '\d LOADOUTER $0\_s*' .. 570 '\d LOADOUTER level 1 $0\_s*' ..
571 '\d LOAD arg\[-1\]\_s*' .. 571 '\d LOAD arg\[-1\]\_s*' ..
572 '\d CONCAT\_s*' .. 572 '\d CONCAT\_s*' ..
573 '\d STOREOUTER $0\_s*' .. 573 '\d STOREOUTER level 1 $0\_s*' ..
574 '\d RETURN 0', 574 '\d RETURN 0',
575 res) 575 res)
576 576
577 res = execute('disass g:Get') 577 res = execute('disass g:Get')
578 assert_match('<lambda>\d\_s*' .. 578 assert_match('<lambda>\d\_s*' ..
579 'return local\_s*' .. 579 'return local\_s*' ..
580 '\d LOADOUTER $0\_s*' .. 580 '\d LOADOUTER level 1 $0\_s*' ..
581 '\d RETURN', 581 '\d RETURN',
582 res) 582 res)
583 583
584 unlet g:Append 584 unlet g:Append
585 unlet g:Get 585 unlet g:Get