2016-05-25 12:04 GMT+03:00 Bram Moolenaar <[email protected]>: > > Nikolay Pavlov wrote: > >> >> 2016-05-24 19:37 GMT+03:00 Bram Moolenaar <[email protected]>: >> >> > >> >> > Patch 7.4.1839 >> >> > Problem: Cannot get the items stored in a partial. >> >> > Solution: Support using get() on a partial. >> >> > Files: src/eval.c, src/testdir/test_partial.vim, >> >> > runtime/doc/eval.tx= >> > >> > [...] >> > >> >> > + {what} are: >> >> > + 'func' The function >> >> >> >> This should be “the function name” I think. When reading “the >> >> function” I expect returning funcref. Maybe even this is what should >> >> actually be returned (I would expect something like “name” key to >> >> return the function name, “func” sounds like returning a funcref as >> >> well): >> > >> > Yeah, when writing this I was also wondering whether to return the name >> > or something else. Returning both is the most flexible. >> > >> > I don't think "subtype" makes sense. This difference is only used >> > internally, the help only talks about Funcref, of which partial is a >> > form where args or dict is bound. get() already indicates a Funcref is >> > like a Partial without arguments or dict. >> >> This is needed to check whether getting args/dict makes any sense. And >> note that your patch created significant difference: trying to use >> `get()` on a funcref errors out, but not on partial. > > I thought I had a test for using get() on a Funcref. What errors out, > can you give an example?
I wrote that message before seeing most recent commit. After *this* patch, but before merging part of the mine it errorred out. > > -- > A)bort, R)etry, P)lease don't bother me again > > /// 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.
