Yegappan wrote:
> Using the latest Vim, when I source the following script:
>
> ---------------------------------------------------------------------------------------------
> vim9script
>
> mkdir('Xtest/autoload', 'p')
>
> var lines =<< trim END
> vim9script
> import "./a.vim"
> def Xtest#Test(): string
> return a.F1()
> enddef
> END
> writefile(lines, 'Xtest/autoload/Xtest.vim')
>
> lines =<< trim END
> vim9script
> export def F2(): string
> return "Hello"
> enddef
> export def F1(): string
> return F2()
> enddef
> END
> writefile(lines, 'Xtest/autoload/a.vim')
>
> set rtp+=./Xtest
> echo Xtest#Test()
>
> delete('Xtest', 'rf')
> ---------------------------------------------------------------------------------------------
>
> I get the "E117: Unknown function: F2" error message (even though the function
> is present). If I remove "export" from the F2() function definition,
> then the error
> goes away.
The function is stored with the autoload name "a#F2" but the code that
looks up the function didn't use the "a#" prefix. I'll fix that.
--
The greatest lies of all time:
(1) The check is in the mail.
(2) We have a really challenging assignment for you.
(3) I love you.
(4) All bugs have been fixed.
(5) This won't hurt a bit.
(6) Honey, I just need to debug this program and be home in 5 minutes.
(7) I have just sent you an e-mail about that.
(8) Of course I'll respect you in the morning.
(9) I'm from the government, and I'm here to help you.
/// 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/20220111152615.95D021C0523%40moolenaar.net.