Ken Takata wrote:
> 2014/8/7 Thu 14:22:32 UTC+9 mattn wrote:
> > Hi list.
> >
> > ----------------------------------------
> > let s:f = function('type')
> > let s:fref = function('s:f')
> > " => <SNR>1_f
> > echo call(s:fref, ['x'])
> > " => E117: Unknown function: <SNR>1_f
> > ----------------------------------------
> >
> > In this script, function('s:f') should be an error.
> >
> > ----------------------------------------
> > let s:fref = function('s:f')
> > ----------------------------------------
>
> How about this patch?
> https://bitbucket.org/k_takata/vim-ktakata-mq/src/535170f9175dbfd922535d585a4b63736329b209/function-noderef.patch?at=default
>
> This doesn't break existing tests.
> I'm not sure which file should I add new tests for this to.
I think test_expr.vim is a good place. But perhaps this test also needs
to include another script to check passing a script-local function in a
funcref to another script?
--
There are three kinds of people: Those who can count & those who can't.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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].
For more options, visit https://groups.google.com/d/optout.