On Mon, Dec 13, 2021 at 7:32 AM Yegappan Lakshmanan <[email protected]> wrote: > > Hi, > > Inside a Vim9 def function, I am not able to create a legacy > script-local function > using the "s:" prefix. Example: > > ---------------------------------------------------------------------------------------- > vim9script > > def T() > func s:F1() > endfunc > var Fn: func = s:F1 > enddef > defcompile > > func s:F2() > endfunc > > var Fn: func = s:F2 > ---------------------------------------------------------------------------------------- > > When I source the above script, I get the "E1075: Namespace not > supported: s:F1()" > error message. > > I am able to define a script-local function using the "s:' prefix at the > script > level though. >
The same issue applies to Vim9 def function also: ---------------------------------------------------------------------------------------- vim9script def T() def s:F1() enddef var Fn: func = s:F1 enddef defcompile def s:F2() enddef var Fn: func = s:F2 ---------------------------------------------------------------------------------------- If I source the above script, I get the "E1075: Namespace not supported: s:F1()" error message. But at the script level, there is no error. - Yegappan -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/CAAW7x7%3D4bfyejOhO_xR5znDr-ipBBJbzvC_hgD%2BHiFuPWyEAmw%40mail.gmail.com.
