mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.1481: Vim9: line number reported with error may be wrong
Problem: Vim9: line number reported with error may be wrong. Solution: Check line number in tests.
This commit is contained in:
@@ -2317,6 +2317,7 @@ call_def_function(
|
||||
// slice: composite is at stack-3, indexes at stack-2 and
|
||||
// stack-1
|
||||
tv = is_slice ? STACK_TV_BOT(-3) : STACK_TV_BOT(-2);
|
||||
SOURCING_LNUM = iptr->isn_lnum;
|
||||
if (check_can_index(tv, TRUE, TRUE) == FAIL)
|
||||
goto on_error;
|
||||
var1 = is_slice ? STACK_TV_BOT(-2) : STACK_TV_BOT(-1);
|
||||
@@ -2463,6 +2464,7 @@ call_def_function(
|
||||
int error = FALSE;
|
||||
|
||||
tv = STACK_TV_BOT(-1);
|
||||
SOURCING_LNUM = iptr->isn_lnum;
|
||||
if (check_not_string(tv) == FAIL)
|
||||
goto on_error;
|
||||
(void)tv_get_number_chk(tv, &error);
|
||||
|
Reference in New Issue
Block a user