Mercurial > vim
comparison src/testdir/test_vim9_disassemble.vim @ 22973:4c97c0747017 v8.2.2033
patch 8.2.2033: Vim9: :def without argument gives compilation error
Commit: https://github.com/vim/vim/commit/6abdcf82859e158713a3d5aa6b1012748ea5c2a0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 22 18:15:44 2020 +0100
patch 8.2.2033: Vim9: :def without argument gives compilation error
Problem: Vim9: :def without argument gives compilation error.
Solution: Add the DEF instruction. (closes https://github.com/vim/vim/issues/7344)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 22 Nov 2020 18:30:05 +0100 |
parents | edfbb06cd0ee |
children | a943b175586a |
comparison
equal
deleted
inserted
replaced
22972:d2b36acb42dd | 22973:4c97c0747017 |
---|---|
903 '\d PUSHNR 0\_s*' .. | 903 '\d PUSHNR 0\_s*' .. |
904 '\d RETURN', | 904 '\d RETURN', |
905 instr) | 905 instr) |
906 enddef | 906 enddef |
907 | 907 |
908 def NestedDefList() | |
909 def | |
910 def Info | |
911 def /Info | |
912 def /Info/ | |
913 enddef | |
914 | |
915 def Test_nested_def_list() | |
916 var instr = execute('disassemble NestedDefList') | |
917 assert_match('NestedDefList\_s*' .. | |
918 'def\_s*' .. | |
919 '\d DEF \_s*' .. | |
920 'def Info\_s*' .. | |
921 '\d DEF Info\_s*' .. | |
922 'def /Info\_s*' .. | |
923 '\d DEF /Info\_s*' .. | |
924 'def /Info/\_s*' .. | |
925 '\d DEF /Info/\_s*' .. | |
926 '\d PUSHNR 0\_s*' .. | |
927 '\d RETURN', | |
928 instr) | |
929 enddef | |
930 | |
908 def AndOr(arg: any): string | 931 def AndOr(arg: any): string |
909 if arg == 1 && arg != 2 || arg == 4 | 932 if arg == 1 && arg != 2 || arg == 4 |
910 return 'yes' | 933 return 'yes' |
911 endif | 934 endif |
912 return 'no' | 935 return 'no' |