Yegappan wrote:

> I see some unexpected behavior when trying to use function()
> with the name of a lambda function:
> 
>     let L = {s -> strlen(s)}
> 
>     :echo L
>     function('<lambda>1')
> 
>     :function <lambda>1
>       function <lambda>1(a, ...)
>     1  return strlen(a)
>       endfunction
> 
>     :echo function('<lambda>1')
>     E129: Function name required
>     E475: Invalid argument: <lambda>1
> 
> I expected the last command to echo "'<lambda>1".

Yeah, that looks inconsistent.  I'll make a patch.

-- 
LARGE MAN:   Who's that then?
CART DRIVER: (Grudgingly) I dunno, Must be a king.
LARGE MAN:   Why?
CART DRIVER: He hasn't got shit all over him.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20211130182535.0112B1C11F8%40moolenaar.net.

Raspunde prin e-mail lui