To: vim_dev@googlegroups.com Subject: Patch 9.0.0174 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ 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 -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///