[vim/vim] wrong line number when passing expression with wrong type to `:cexpr` (Issue #10735)

11 views
Skip to first unread message

lacygoill

unread,
Jul 13, 2022, 8:42:22 PM7/13/22
to vim/vim, Subscribed

Steps to reproduce

Run this shell command:

vim -Nu NONE -S <(tee <<'EOF'
    vim9script
    def Func()
        var qfl = {}
        cexpr qfl
    enddef
    Func()
EOF
)

An error is given on line 1:

line    1:
E777: String or List expected

Expected behavior

The error is given on line 2:

line    1:
E777: String or List expected

Because the command responsible for the error is :cexpr qfl, which is on line 2; not on line 1.

Version of Vim

9.0 Included patches: 1-50

Environment

Operating system: Ubuntu 20.04.4 LTS
Terminal: xterm
Value of $TERM: xterm-256color
Shell: GNU bash, version 5.0.17

Additional context

No issue at the script level:

vim9script
var qfl = {}
cexpr qfl
line    3:
E777: String or List expected

The error is given on line 3, which is correct.


The error is given at runtime. It would help if it was given earlier; i.e. at compile time.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/10735@github.com>

Bram Moolenaar

unread,
Jul 18, 2022, 12:50:26 PM7/18/22
to vim/vim, Subscribed

Closed #10735 as completed via bd683e3.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/10735/issue_event/7013743882@github.com>

Reply all
Reply to author
Forward
0 new messages