vim9: misleading error message

13 views
Skip to first unread message

Ernie Rael

unread,
Mar 17, 2022, 10:43:02 AM3/17/22
to vim...@googlegroups.com
Run this shell command

   vim -Nu NONE -S <(tee <<'EOF'
        vim9script
        def X(f: func): any
            return f()
        enddef
        echo X(() => "HERE")
   EOF
   )

An error is given

   E117: Unknown function: f

Expected

Either it works. Or a better error message is given. Perhaps

   E1267: Function name must start with a capital: f()

Bram Moolenaar

unread,
Mar 17, 2022, 12:24:12 PM3/17/22
to vim...@googlegroups.com, Ernie Rael
Right. We can use the existing error E704.

--
Facepalm statement #2: "If there is a country without immigrants I'm going to
move there"

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages