Mercurial > vim
comparison src/testdir/test_vim9_script.vim @ 23428:5807e3958e38 v8.2.2257
patch 8.2.2257: Vim9: using -> for lambda is ambiguous
Commit: https://github.com/vim/vim/commit/2949cfdbe4335b9abcfeda1be4dfc52090ee1df6
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 31 21:28:47 2020 +0100
patch 8.2.2257: Vim9: using -> for lambda is ambiguous
Problem: Vim9: using -> for lambda is ambiguous.
Solution: Stop supporting ->, must use =>.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 31 Dec 2020 21:30:03 +0100 |
parents | 17a0e32eefd4 |
children | b0587f7ec422 |
comparison
equal
deleted
inserted
replaced
23427:8f2dcc0cfcf6 | 23428:5807e3958e38 |
---|---|
1160 END | 1160 END |
1161 writefile(export, 'XexportCmd.vim') | 1161 writefile(export, 'XexportCmd.vim') |
1162 | 1162 |
1163 var buf = RunVimInTerminal('-c "import Foo from ''./XexportCmd.vim''"', { | 1163 var buf = RunVimInTerminal('-c "import Foo from ''./XexportCmd.vim''"', { |
1164 rows: 6, wait_for_ruler: 0}) | 1164 rows: 6, wait_for_ruler: 0}) |
1165 WaitForAssert({-> assert_match('^E1094:', term_getline(buf, 5))}) | 1165 WaitForAssert(() => assert_match('^E1094:', term_getline(buf, 5))) |
1166 | 1166 |
1167 delete('XexportCmd.vim') | 1167 delete('XexportCmd.vim') |
1168 StopVimInTerminal(buf) | 1168 StopVimInTerminal(buf) |
1169 enddef | 1169 enddef |
1170 | 1170 |
3062 writefile(lines, 'XcallFunc') | 3062 writefile(lines, 'XcallFunc') |
3063 var buf = RunVimInTerminal('-S XcallFunc', {rows: 6}) | 3063 var buf = RunVimInTerminal('-S XcallFunc', {rows: 6}) |
3064 # define Afunc() on the command line | 3064 # define Afunc() on the command line |
3065 term_sendkeys(buf, ":def Afunc()\<CR>Bfunc()\<CR>enddef\<CR>") | 3065 term_sendkeys(buf, ":def Afunc()\<CR>Bfunc()\<CR>enddef\<CR>") |
3066 term_sendkeys(buf, ":call CheckAndQuit()\<CR>") | 3066 term_sendkeys(buf, ":call CheckAndQuit()\<CR>") |
3067 WaitForAssert({-> assert_equal(['errors: []'], readfile('Xdidcmd'))}) | 3067 WaitForAssert(() => assert_equal(['errors: []'], readfile('Xdidcmd'))) |
3068 | 3068 |
3069 call StopVimInTerminal(buf) | 3069 call StopVimInTerminal(buf) |
3070 delete('XcallFunc') | 3070 delete('XcallFunc') |
3071 delete('Xdidcmd') | 3071 delete('Xdidcmd') |
3072 enddef | 3072 enddef |