how to disassemble an nested function

11 views
Skip to first unread message

Ernie Rael

unread,
Apr 29, 2022, 12:21:09 AM4/29/22
to vim...@googlegroups.com
Hi all,

This may be the first time I have to consider the <>Funct stuff. I'd
like to disassemble an nested function. Tried several things, the
example below fails with

Error detected while processing :source buffer=5[12]..function <SNR>37_A:
line    5:
E1061: Cannot find function B

vim9script

def A()
    def B()
        printf('foo')
    enddef
    printf('bar')
    disassemble B
enddef
defcompile
disassemble A
A()

Bram Moolenaar

unread,
Apr 29, 2022, 5:16:33 AM4/29/22
to vim...@googlegroups.com, Ernie Rael
Look at the output of "disassemble A", there should be a <lambda>123
used there, you can disassemble that one.

Remove the "disassemble B".

--
From "know your smileys":
;-0 Can't find shift key
,-9 Kann Umschalttaste nicht finden

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages