Mercurial > vim
diff src/testdir/test_vim9_expr.vim @ 20029:8fb1cf4c44d5 v8.2.0570
patch 8.2.0570: Vim9: no error when omitting type from argument
Commit: https://github.com/vim/vim/commit/6e949784be29bfaea6e49a9d8231481eae10fab6
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Apr 13 17:21:00 2020 +0200
patch 8.2.0570: Vim9: no error when omitting type from argument
Problem: Vim9: no error when omitting type from argument.
Solution: Enforce specifying argument types.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 13 Apr 2020 17:30:05 +0200 |
parents | bf377a9ffccb |
children | 7fc5d62fe2a5 |
line wrap: on
line diff
--- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -859,11 +859,11 @@ def Test_expr7_negate() assert_equal(88, --nr) enddef -def Echo(arg): string +def Echo(arg: any): string return arg enddef -def s:EchoArg(arg): string +def s:EchoArg(arg: any): string return arg enddef @@ -991,6 +991,7 @@ def Test_expr7_trailing() assert_equal(123, d.key) enddef + func Test_expr7_trailing_fails() call CheckDefFailureList(['let l = [2]', 'l->{l -> add(l, 8)}'], 'E107') call CheckDefFailureList(['let l = [2]', 'l->{l -> add(l, 8)} ()'], 'E274')