Mercurial > vim
diff src/testdir/test_vim9_script.vim @ 24295:7f634eae21fe v8.2.2688
patch 8.2.2688: Vim9: crash when using s: for script variable
Commit: https://github.com/vim/vim/commit/ca51cc0a335d0c449784440501c7d46ee8f84ce4
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Apr 1 21:38:53 2021 +0200
patch 8.2.2688: Vim9: crash when using s: for script variable
Problem: Vim9: crash when using s: for script variable.
Solution: Pass the end pointer. (closes https://github.com/vim/vim/issues/8045)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 01 Apr 2021 21:45:02 +0200 |
parents | bcfff560e089 |
children | bed5ec739304 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -1644,9 +1644,10 @@ def Test_vim9script_funcref() # using the function from a compiled function def TestMore(): string - return anAlias.GetString('text') + var s = s:anAlias.GetString('foo') + return s .. anAlias.GetString('bar') enddef - assert_equal('text', TestMore()) + assert_equal('foobar', TestMore()) # error when using a function that isn't exported assert_fails('anAlias.Compare(1, 2)', 'E1049:')