patch 8.2.3709: Vim9: backtick expression expanded when not desired
Problem: Vim9: backtick expression expanded when not desired.
Solution: Only expand a backtick expression for commands that expand their
argument. Remove a few outdated TODO comments.
diff --git a/src/testdir/test_vim9_cmd.vim b/src/testdir/test_vim9_cmd.vim
index 45e4fb0..2fbccf4 100644
--- a/src/testdir/test_vim9_cmd.vim
+++ b/src/testdir/test_vim9_cmd.vim
@@ -206,6 +206,15 @@
folddoclose edit `=name`
assert_equal('xxx', bufname())
bwipe!
+
+ var lines =<< trim END
+ g:val = 'value'
+ def Test()
+ folddoopen echo `=g:val`
+ enddef
+ call Test()
+ END
+ CheckScriptFailure(lines, 'E15: Invalid expression: "`=g:val`"')
enddef
def Test_hardcopy_wildcards()