Patch 9.0.1573
Problem: Error for function name has wrong line number.
Solution: Set the line number before giving the error.
Files: src/vim9execute.c, src/testdir/test_vim9_func.vim
*** ../vim-9.0.1572/src/vim9execute.c 2023-04-30 18:50:44.571465836 +0100
--- src/vim9execute.c 2023-05-23 14:37:38.857871697 +0100
***************
*** 4448,4453 ****
--- 4448,4454 ----
CLEAR_FIELD(ea);
ea.cmd = ea.arg = iptr->isn_arg.string;
ga_init2(&lines_to_free, sizeof(char_u *), 50);
+ SOURCING_LNUM = iptr->isn_lnum;
define_function(&ea, NULL, &lines_to_free, 0);
ga_clear_strings(&lines_to_free);
}
*** ../vim-9.0.1572/src/testdir/test_vim9_func.vim 2023-05-15
16:22:34.403075980 +0100
--- src/testdir/test_vim9_func.vim 2023-05-23 14:35:37.482304707 +0100
***************
*** 166,171 ****
--- 166,179 ----
delfunc g:Define
enddef
+ def Test_listing_function_error()
+ var lines =<< trim END
+ var filler = 123
+ func DoesNotExist
+ END
+ v9.CheckDefExecFailure(lines, 'E123:', 2)
+ enddef
+
def Test_break_in_skipped_block()
var lines =<< trim END
vim9script
*** ../vim-9.0.1572/src/version.c 2023-05-20 16:39:03.341433568 +0100
--- src/version.c 2023-05-23 14:36:42.470061110 +0100
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1573,
/**/
--
Over the years, I've developed my sense of deja vu so acutely that now
I can remember things that *have* happened before ...
/// 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/20230523134911.4020A1C0F38%40moolenaar.net.