patch 9.0.0350: :echowindow does not work in a compiled function
Problem: :echowindow does not work in a compiled function.
Solution: Handle the expression at compile time.
diff --git a/src/testdir/test_vim9_disassemble.vim b/src/testdir/test_vim9_disassemble.vim
index be40088..12be156 100644
--- a/src/testdir/test_vim9_disassemble.vim
+++ b/src/testdir/test_vim9_disassemble.vim
@@ -2274,6 +2274,8 @@
echomsg 'some' 'message'
echoconsole 'nothing'
echoerr 'went' .. 'wrong'
+ var local = 'window'
+ echowin 'in' local
enddef
def Test_disassemble_echomsg()
@@ -2289,7 +2291,14 @@
"echoerr 'went' .. 'wrong'\\_s*" ..
'\d PUSHS "wentwrong"\_s*' ..
'\d ECHOERR 1\_s*' ..
- '\d RETURN void',
+ "var local = 'window'\\_s*" ..
+ '\d\+ PUSHS "window"\_s*' ..
+ '\d\+ STORE $0\_s*' ..
+ "echowin 'in' local\\_s*" ..
+ '\d\+ PUSHS "in"\_s*' ..
+ '\d\+ LOAD $0\_s*' ..
+ '\d\+ ECHOWINDOW 2\_s*' ..
+ '\d\+ RETURN void',
res)
enddef