Place the following in the autoload path:

function dictautotest#doit() dict
endfunction

And the following in a separate test script:

let mydict = { 'doit': function('dictautotest#doit') }
let Mypartial = mydict.doit
call Mypartial()

This script will fail first time it is run. The reason is at partial 
construction time, the function will not be autoloaded, and treated by default 
as a non-dict function, and thus the partial will not store the self dict. 
However at call time the function is loaded, and suddenly treated as a dict 
function, and now vim complains that the function is called without Dictionary, 
because the partial lacks the self attribute.

Either the partial construction code should probably autoload the function, or 
somehow construct it as a "maybe-self" partial, that silently will discard the 
self if it turned out not to be a dict function.

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui