Patch 9.0.0174
Problem: No error for using "#{ comment" in a compiled function.
Solution: Make error checking for "#{" consistent. (closes #10855)
Files: src/vim9compile.c, src/testdir/test_vim9_func.vim
*** ../vim-9.0.0173/src/vim9compile.c 2022-07-26 15:10:52.809542593 +0100
--- src/vim9compile.c 2022-08-08 21:33:51.032985321 +0100
***************
*** 2899,2905 ****
if (*ea.cmd == '#')
{
! // "#" starts a comment
line = (char_u *)"";
continue;
}
--- 2899,2907 ----
if (*ea.cmd == '#')
{
! // "#" starts a comment, but "#{" is an error
! if (vim9_bad_comment(ea.cmd))
! goto erret;
line = (char_u *)"";
continue;
}
*** ../vim-9.0.0173/src/testdir/test_vim9_func.vim 2022-07-18
17:48:46.380542879 +0100
--- src/testdir/test_vim9_func.vim 2022-08-08 21:38:10.713897702 +0100
***************
*** 74,79 ****
--- 74,83 ----
delete('Xdir', 'rf')
enddef
+ def Test_comment_error()
+ v9.CheckDefFailure(['#{ comment'], 'E1170:')
+ enddef
+
def Test_compile_error_in_called_function()
var lines =<< trim END
vim9script
*** ../vim-9.0.0173/src/version.c 2022-08-08 18:12:27.616094206 +0100
--- src/version.c 2022-08-08 21:36:48.745668109 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 174,
/**/
--
MAN: You don't frighten us, English pig-dog! Go and boil your bottoms,
son of a silly person. I blow my nose on you, so-called Arthur-king,
you and your silly English K...kaniggets.
He puts hands to his ears and blows a raspberry.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// 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/20220808204336.01E1E1C0EC3%40moolenaar.net.