Patch 8.2.4312
Problem: No error for using :vim9script in a :def function.
Solution: Give an error when compiling.
Files: src/vim9compile.c, src/testdir/test_vim9_script.vim
*** ../vim-8.2.4311/src/vim9compile.c 2022-02-02 16:20:22.386554561 +0000
--- src/vim9compile.c 2022-02-06 17:26:37.385862818 +0000
***************
*** 3138,3143 ****
--- 3138,3147 ----
line = compile_script(line, &cctx);
break;
+ case CMD_vim9script:
+ emsg(_(e_vim9script_can_only_be_used_in_script));
+ goto erret;
+
case CMD_global:
if (check_global_and_subst(ea.cmd, p) == FAIL)
goto erret;
*** ../vim-8.2.4311/src/testdir/test_vim9_script.vim 2022-02-04
21:58:53.437278804 +0000
--- src/testdir/test_vim9_script.vim 2022-02-06 17:15:09.218741264 +0000
***************
*** 1227,1232 ****
--- 1227,1233 ----
v9.CheckScriptFailure(['vim9script', 'const str = "asdf"', 'str = "xxx"'],
'E46:')
assert_fails('vim9script', 'E1038:')
+ v9.CheckDefFailure(['vim9script'], 'E1038:')
enddef
def Test_script_var_shadows_function()
*** ../vim-8.2.4311/src/version.c 2022-02-06 17:16:57.730598839 +0000
--- src/version.c 2022-02-06 17:27:28.773823785 +0000
***************
*** 748,749 ****
--- 748,751 ----
{ /* Add new patch number below this line */
+ /**/
+ 4312,
/**/
--
hundred-and-one symptoms of being an internet addict:
14. You start introducing yourself as "Jim at I-I-Net dot net dot au"
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220206173112.1EF4E1C071D%40moolenaar.net.