Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 21471:126dcb0411ed v8.2.1286
patch 8.2.1286: Vim9: No error when using a type to a window variable
Commit: https://github.com/vim/vim/commit/43e969d3f98766824c18d20b84f2fab00feef683
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 23 21:14:43 2020 +0200
patch 8.2.1286: Vim9: No error when using a type to a window variable
Problem: Vim9: No error when using a type to a window variable
Solution: Recognize the syntax and give an error. (closes https://github.com/vim/vim/issues/6521)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 23 Jul 2020 21:15:05 +0200 |
parents | 369cde0d5771 |
children | 8bcd1ee2630b |
comparison
equal
deleted
inserted
replaced
21470:f0304ef8ac7d | 21471:126dcb0411ed |
---|---|
374 call CheckDefFailure(['let var: dict <number>'], 'E1068:') | 374 call CheckDefFailure(['let var: dict <number>'], 'E1068:') |
375 call CheckDefFailure(['let var: dict<number'], 'E1009:') | 375 call CheckDefFailure(['let var: dict<number'], 'E1009:') |
376 | 376 |
377 call assert_fails('s/^/\=Mess()/n', 'E794:') | 377 call assert_fails('s/^/\=Mess()/n', 'E794:') |
378 call CheckDefFailure(['let var: dict<number'], 'E1009:') | 378 call CheckDefFailure(['let var: dict<number'], 'E1009:') |
379 | |
380 call CheckDefFailure(['w:foo: number = 10'], | |
381 'E488: Trailing characters: : number = 1') | |
382 call CheckDefFailure(['t:foo: bool = true'], | |
383 'E488: Trailing characters: : bool = true') | |
384 call CheckDefFailure(['b:foo: string = "x"'], | |
385 'E488: Trailing characters: : string = "x"') | |
386 call CheckDefFailure(['g:foo: number = 123'], | |
387 'E488: Trailing characters: : number = 123') | |
379 enddef | 388 enddef |
380 | 389 |
381 def Test_unlet() | 390 def Test_unlet() |
382 g:somevar = 'yes' | 391 g:somevar = 'yes' |
383 assert_true(exists('g:somevar')) | 392 assert_true(exists('g:somevar')) |