Monday, May 22, 2023

E123 when referring to function argument

Hello.

I want to peek into a lambda so I can evaluate it in a new Vim process. Why do I get 'E123: Undefined function: Op' when I source this script?

vim9script
def! g:LambdaText(Op: func(): number): void
    func Op
enddef

def! g:TestRun(): void
    g:LambdaText(() => 2 * 4)
enddef

g:TestRun()


Matan

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/CAATngTObX3maQ32K6TFSRmSsLuY9D0S2m2Ob-fYGYwuPsobQ9A%40mail.gmail.com.

No comments:

Post a Comment