Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 21747:7e1316c6d0eb v8.2.1423
patch 8.2.1423: Vim9: find global function when looking for script-local
Commit: https://github.com/vim/vim/commit/035d6e91bd83574cab5a913c5c3a924d9011696b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 11 22:30:42 2020 +0200
patch 8.2.1423: Vim9: find global function when looking for script-local
Problem: Vim9: find global function when looking for script-local.
Solution: Don't strip prefix if name starts with "s:". (closes https://github.com/vim/vim/issues/6688)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 11 Aug 2020 22:45:05 +0200 |
parents | 4e4fd845553d |
children | cc8188c22a47 |
comparison
equal
deleted
inserted
replaced
21746:b62f11358b97 | 21747:7e1316c6d0eb |
---|---|
201 enddef | 201 enddef |
202 assert_equal('global', g:Func()) | 202 assert_equal('global', g:Func()) |
203 assert_equal('local', Func()) | 203 assert_equal('local', Func()) |
204 END | 204 END |
205 CheckScriptSuccess(lines) | 205 CheckScriptSuccess(lines) |
206 | |
207 lines =<< trim END | |
208 vim9script | |
209 def g:Funcy() | |
210 echo 'funcy' | |
211 enddef | |
212 s:Funcy() | |
213 END | |
214 CheckScriptFailure(lines, 'E117:') | |
206 enddef | 215 enddef |
207 | 216 |
208 func TakesOneArg(arg) | 217 func TakesOneArg(arg) |
209 echo a:arg | 218 echo a:arg |
210 endfunc | 219 endfunc |