Mercurial > vim
diff src/testdir/test_vim9_assign.vim @ 23138:1a9705075244 v8.2.2115
patch 8.2.2115: Vim9: some errors not tested for; dead code
Commit: https://github.com/vim/vim/commit/7257af477bc5f33153f8f700b643551525f1105b
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 8 22:08:51 2020 +0100
patch 8.2.2115: Vim9: some errors not tested for; dead code
Problem: Vim9: some errors not tested for; dead code.
Solution: Add a test. Remove dead code.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 08 Dec 2020 22:15:04 +0100 |
parents | f8cd5a5e03c4 |
children | 055fa9db6f39 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_assign.vim +++ b/src/testdir/test_vim9_assign.vim @@ -1045,6 +1045,9 @@ def Test_var_declaration() s:name = 'prefixed' g:var_prefixed = s:name + const FOO: number = 123 + assert_equal(123, FOO) + var s:other: number other = 1234 g:other_var = other @@ -1087,6 +1090,10 @@ def Test_var_declaration_fails() var 9var: string END CheckScriptFailure(lines, 'E475:') + + CheckDefFailure(['var foo.bar = 2'], 'E1087:') + CheckDefFailure(['var foo[3] = 2'], 'E1087:') + CheckDefFailure(['const foo: number'], 'E1021:') enddef def Test_var_type_check()