Mercurial > vim
comparison src/testdir/test_vim9_assign.vim @ 29782:35cbea786334 v9.0.0230
patch 9.0.0230: no error for comma missing in list in :def function
Commit: https://github.com/vim/vim/commit/2984ed31d92f7da19b3dc86b37764c55669dd7c2
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Aug 20 14:51:17 2022 +0100
patch 9.0.0230: no error for comma missing in list in :def function
Problem: No error for comma missing in list in :def function.
Solution: Check for missing comma. (closes https://github.com/vim/vim/issues/10943)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 20 Aug 2022 16:00:04 +0200 |
parents | 9f8dd1b77563 |
children | 13b02c1ea0f7 |
comparison
equal
deleted
inserted
replaced
29781:bcb7e4222d17 | 29782:35cbea786334 |
---|---|
2126 'channels', 'channol', | 2126 'channels', 'channol', |
2127 'dicts', 'duct', | 2127 'dicts', 'duct', |
2128 'floats', 'floot', | 2128 'floats', 'floot', |
2129 'funcs', 'funk', | 2129 'funcs', 'funk', |
2130 'jobs', 'jop', | 2130 'jobs', 'jop', |
2131 'lists', 'last' | 2131 'lists', 'last', |
2132 'numbers', 'numbar', | 2132 'numbers', 'numbar', |
2133 'strings', 'strung', | 2133 'strings', 'strung', |
2134 'voids', 'viod'] | 2134 'voids', 'viod'] |
2135 v9.CheckDefAndScriptFailure([$'var foo: {type}'], 'E1010:', 1) | 2135 v9.CheckDefAndScriptFailure([$'var foo: {type}'], 'E1010:', 1) |
2136 endfor | 2136 endfor |
2437 'var dd = {a: 1}', | 2437 'var dd = {a: 1}', |
2438 'unlet dd[g:alist]', | 2438 'unlet dd[g:alist]', |
2439 ], 'E1105:', 2) | 2439 ], 'E1105:', 2) |
2440 | 2440 |
2441 v9.CheckDefExecFailure([ | 2441 v9.CheckDefExecFailure([ |
2442 'g:dd = {"a": 1, 2: 2}' | 2442 'g:dd = {"a": 1, 2: 2}', |
2443 'unlet g:dd[0z11]', | 2443 'unlet g:dd[0z11]', |
2444 ], 'E1029:', 2) | 2444 ], 'E1029:', 2) |
2445 v9.CheckDefExecFailure([ | 2445 v9.CheckDefExecFailure([ |
2446 'g:str = "a string"' | 2446 'g:str = "a string"', |
2447 'unlet g:str[0]', | 2447 'unlet g:str[0]', |
2448 ], 'E1148: Cannot index a string', 2) | 2448 ], 'E1148: Cannot index a string', 2) |
2449 | 2449 |
2450 # can compile unlet before variable exists | 2450 # can compile unlet before variable exists |
2451 g:someDict = {key: 'val'} | 2451 g:someDict = {key: 'val'} |