Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 22244:9f6b8fdea159 v8.2.1671
patch 8.2.1671: Vim9: stray error for missing white space
Commit: https://github.com/vim/vim/commit/c6e57b74fa1e6090a27f886e2b3830fd1fa15708
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Sep 12 21:27:03 2020 +0200
patch 8.2.1671: Vim9: stray error for missing white space
Problem: Vim9: stray error for missing white space.
Solution: Do not skip over white space after member. (closes https://github.com/vim/vim/issues/6817)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 12 Sep 2020 21:30:04 +0200 |
parents | 939f7184566f |
children | 3f082bd15d29 |
comparison
equal
deleted
inserted
replaced
22243:a308c4737b02 | 22244:9f6b8fdea159 |
---|---|
2312 lines = ['let l = [0, 1, 2]', 'echo l[g:astring : g:theone]'] | 2312 lines = ['let l = [0, 1, 2]', 'echo l[g:astring : g:theone]'] |
2313 CheckDefExecFailure(lines, 'E1029:') | 2313 CheckDefExecFailure(lines, 'E1029:') |
2314 CheckScriptFailure(['vim9script'] + lines, 'E1030:', 3) | 2314 CheckScriptFailure(['vim9script'] + lines, 'E1030:', 3) |
2315 enddef | 2315 enddef |
2316 | 2316 |
2317 def Test_expr7_dict_subscript() | |
2318 let lines =<< trim END | |
2319 vim9script | |
2320 let l = [#{lnum: 2}, #{lnum: 1}] | |
2321 let res = l[0].lnum > l[1].lnum | |
2322 assert_true(res) | |
2323 END | |
2324 CheckScriptSuccess(lines) | |
2325 enddef | |
2326 | |
2317 def Test_expr7_subscript_linebreak() | 2327 def Test_expr7_subscript_linebreak() |
2318 let range = range( | 2328 let range = range( |
2319 3) | 2329 3) |
2320 let l = range | 2330 let l = range |
2321 ->map('string(v:key)') | 2331 ->map('string(v:key)') |