patch 8.2.2792: Vim9: :disas shows instructions for default args but no text
Problem: Vim9: :disas shows instructions for default args but no text.
Solution: Show the expression test above the default argument instructions.
(closes #8129)
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index bf88d93..b1c1c18 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -724,20 +724,22 @@
enddef
-def FuncWithDefault(arg: string = 'default', nr = 77): string
+def FuncWithDefault(l: number, arg: string = "default", nr = 77): string
return arg .. nr
enddef
def Test_disassemble_call_default()
var res = execute('disass FuncWithDefault')
assert_match('FuncWithDefault\_s*' ..
+ ' arg = "default"\_s*' ..
'\d JUMP_IF_ARG_SET arg\[-2\] -> 3\_s*' ..
'\d PUSHS "default"\_s*' ..
'\d STORE arg\[-2]\_s*' ..
+ ' nr = 77\_s*' ..
'3 JUMP_IF_ARG_SET arg\[-1\] -> 6\_s*' ..
'\d PUSHNR 77\_s*' ..
'\d STORE arg\[-1]\_s*' ..
- 'return arg .. nr\_s*' ..
+ ' return arg .. nr\_s*' ..
'6 LOAD arg\[-2]\_s*' ..
'\d LOAD arg\[-1]\_s*' ..
'\d 2STRING stack\[-1]\_s*' ..