Skip to content

Instantly share code, notes, and snippets.

@thinca
Created March 19, 2016 19:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinca/611c6a0982fdf0f71ee4 to your computer and use it in GitHub Desktop.
Save thinca/611c6a0982fdf0f71ee4 to your computer and use it in GitHub Desktop.
test delete object with funcref
let obj = {}
function! obj.func() abort
endfunction
let funcname = matchstr(string(obj.func), 'function(''\zs.\{-}\ze'')')
echo assert_true(exists('*{' . funcname . '}'))
unlet obj
echo assert_false(exists('*{' . funcname . '}'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment