mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.0174: no error for using "#{ comment" in a compiled function
Problem: No error for using "#{ comment" in a compiled function. Solution: Make error checking for "#{" consistent. (closes #10855)
This commit is contained in:
@@ -74,6 +74,10 @@ def TestCompilingErrorInTry()
|
|||||||
delete('Xdir', 'rf')
|
delete('Xdir', 'rf')
|
||||||
enddef
|
enddef
|
||||||
|
|
||||||
|
def Test_comment_error()
|
||||||
|
v9.CheckDefFailure(['#{ comment'], 'E1170:')
|
||||||
|
enddef
|
||||||
|
|
||||||
def Test_compile_error_in_called_function()
|
def Test_compile_error_in_called_function()
|
||||||
var lines =<< trim END
|
var lines =<< trim END
|
||||||
vim9script
|
vim9script
|
||||||
|
@@ -735,6 +735,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
174,
|
||||||
/**/
|
/**/
|
||||||
173,
|
173,
|
||||||
/**/
|
/**/
|
||||||
|
@@ -2899,7 +2899,9 @@ compile_def_function(
|
|||||||
|
|
||||||
if (*ea.cmd == '#')
|
if (*ea.cmd == '#')
|
||||||
{
|
{
|
||||||
// "#" starts a comment
|
// "#" starts a comment, but "#{" is an error
|
||||||
|
if (vim9_bad_comment(ea.cmd))
|
||||||
|
goto erret;
|
||||||
line = (char_u *)"";
|
line = (char_u *)"";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user