From: Bram Moolenaar Date: Mon, 14 Sep 2020 14:50:05 +0000 (+0200) Subject: patch 8.2.1680: Vim9: line number for compare error is wrong X-Git-Tag: v8.2.1680 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eb26f4331f607b1639bf01f4f35ad3ce7d20cb10;p=vim patch 8.2.1680: Vim9: line number for compare error is wrong Problem: Vim9: line number for compare error is wrong. Solution: Set SOURCING_LNUM. (closes #6936) --- diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim index 84e8cb3cc..b09242e91 100644 --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -481,6 +481,7 @@ def Test_expr4_equal() set noignorecase CheckDefFailure(["let x = 'a' == xxx"], 'E1001:', 1) + CheckDefExecFailure(['let items: any', 'eval 1', 'eval 2', 'if items == []', 'endif'], 'E691:', 4) let bb = 0z3f assert_equal(true, 0z3f == bb) diff --git a/src/version.c b/src/version.c index a04f93ca2..89ef82a34 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1680, /**/ 1679, /**/ diff --git a/src/vim9execute.c b/src/vim9execute.c index e93817a62..c2bd857ab 100644 --- a/src/vim9execute.c +++ b/src/vim9execute.c @@ -2126,6 +2126,7 @@ call_def_function( exptype_T exptype = iptr->isn_arg.op.op_type; int ic = iptr->isn_arg.op.op_ic; + SOURCING_LNUM = iptr->isn_lnum; typval_compare(tv1, tv2, exptype, ic); clear_tv(tv2); --ectx.ec_stack.ga_len;