Mercurial > vim
diff src/testdir/test_vim9_expr.vim @ 24936:345619f35112 v8.2.3005
patch 8.2.3005: Vim9: using a void value does not give a proper error message
Commit: https://github.com/vim/vim/commit/f57b43c230c23117650c956c1f62546a34500fb6
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 15 22:13:27 2021 +0200
patch 8.2.3005: Vim9: using a void value does not give a proper error message
Problem: Vim9: using a void value does not give a proper error message.
Solution: Give a clear error message. (clodes https://github.com/vim/vim/issues/8387)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 15 Jun 2021 22:15:03 +0200 |
parents | 3c8bd1d392d1 |
children | 21ec48d542a8 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -2967,6 +2967,20 @@ def Test_expr7_method_call() assert_equal([1, 2, 3], sorted) END CheckDefAndScriptSuccess(lines) + + lines =<< trim END + def RetVoid() + enddef + RetVoid()->byte2line() + END + CheckDefExecAndScriptFailure(lines, 'E1031:') + + lines =<< trim END + def RetVoid() + enddef + RetVoid()->byteidx(3) + END + CheckDefExecAndScriptFailure(lines, 'E1031:') enddef