diff options
author | Bram Moolenaar <Bram@vim.org> | 2020-09-14 16:50:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2020-09-14 16:50:05 +0200 |
commit | eb26f4331f607b1639bf01f4f35ad3ce7d20cb10 (patch) | |
tree | 74bb5669295ee1dea3a9cb1e33249b4a056c8b65 /src | |
parent | 3bd8de40b484d3617a19092d3cc036f8b4f3d51c (diff) | |
download | vim-git-eb26f4331f607b1639bf01f4f35ad3ce7d20cb10.tar.gz |
patch 8.2.1680: Vim9: line number for compare error is wrongv8.2.1680
Problem: Vim9: line number for compare error is wrong.
Solution: Set SOURCING_LNUM. (closes #6936)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_vim9_expr.vim | 1 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/vim9execute.c | 1 |
3 files changed, 4 insertions, 0 deletions
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 @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1680, +/**/ 1679, /**/ 1678, 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; |