Steps to reproduce
Run this shell command:
vim -Nu NONE -S <(tee <<'EOF'
vim9script
def Outer()
def g:Inner()
echomsg 'from g:Inner()'
enddef
call(g:Inner, [])
enddef
Outer()
EOF
)
E121 is given:
E121: Undefined variable: g:Inner
Expected behavior
No error is given. from g:Inner() is echo'ed.
Version of Vim
8.2 Included patches: 1-4442
Environment
Operating system: Ubuntu 20.04.4 LTS
Terminal: xterm
Value of $TERM: xterm-256color
Shell: zsh 5.8
Additional context
We don't need quotes if Inner() is turned into a function-local function:
vim9script def Outer() def Inner() echomsg 'from Inner()' enddef call(Inner, []) enddef Outer()
from Inner()
And we don't need quotes if g:Inner() is called at the script level:
vim9script def g:Inner() echomsg 'from g:Inner()' enddef call(g:Inner, [])
from g:Inner()
This is inconsistent. If we don't need quotes in these snippets, why should we need them in the first one?
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()
—
Reply to this email directly, view it on GitHub.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.![]()