Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 24202:c50c5464e6dc v8.2.2642
patch 8.2.2642: Vim9: no clear error for wrong inline function
Commit: https://github.com/vim/vim/commit/e98f60a5912d30db289231aed7d3a1d74beaae20
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Mar 22 18:22:30 2021 +0100
patch 8.2.2642: Vim9: no clear error for wrong inline function
Problem: Vim9: no clear error for wrong inline function.
Solution: Check for something following the "{".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 22 Mar 2021 18:30:03 +0100 |
parents | c20e763bc73c |
children | 7a21b2581dce |
comparison
equal
deleted
inserted
replaced
24201:1b0ca859705b | 24202:c50c5464e6dc |
---|---|
1961 return 'no' | 1961 return 'no' |
1962 }) | 1962 }) |
1963 assert_equal(['no', 'yes', 'no'], dll) | 1963 assert_equal(['no', 'yes', 'no'], dll) |
1964 END | 1964 END |
1965 CheckDefAndScriptSuccess(lines) | 1965 CheckDefAndScriptSuccess(lines) |
1966 | |
1967 lines =<< trim END | |
1968 map([1, 2], (k, v) => { redrawt }) | |
1969 END | |
1970 CheckDefAndScriptFailure(lines, 'E488') | |
1966 enddef | 1971 enddef |
1967 | 1972 |
1968 def NewLambdaWithComments(): func | 1973 def NewLambdaWithComments(): func |
1969 return (x) => | 1974 return (x) => |
1970 # some comment | 1975 # some comment |