Mercurial > vim
comparison src/testdir/test_vim9_expr.vim @ 21650:79a8d723a3d2 v8.2.1375
patch 8.2.1375: Vim9: method name with digit not accepted
Commit: https://github.com/vim/vim/commit/c5da1fb7ea4126b6c70426cf0add51e720b7cd3f
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 5 15:43:44 2020 +0200
patch 8.2.1375: Vim9: method name with digit not accepted
Problem: Vim9: method name with digit not accepted.
Solution: Use eval_isnamec() instead of eval_isnamec1(). (closes https://github.com/vim/vim/issues/6613)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 05 Aug 2020 15:45:04 +0200 |
parents | 7d3ba70a03f1 |
children | c3f6006bf0ba |
comparison
equal
deleted
inserted
replaced
21649:cd7f9936b198 | 21650:79a8d723a3d2 |
---|---|
1672 | 1672 |
1673 def Echo(arg: any): string | 1673 def Echo(arg: any): string |
1674 return arg | 1674 return arg |
1675 enddef | 1675 enddef |
1676 | 1676 |
1677 def s:EchoArg(arg: any): string | 1677 def s:Echo4Arg(arg: any): string |
1678 return arg | 1678 return arg |
1679 enddef | 1679 enddef |
1680 | 1680 |
1681 def Test_expr7_call() | 1681 def Test_expr7_call() |
1682 assert_equal('yes', 'yes'->Echo()) | 1682 assert_equal('yes', 'yes'->Echo()) |
1683 assert_equal('yes', 'yes' | 1683 assert_equal('yes', 'yes' |
1684 ->s:EchoArg()) | 1684 ->s:Echo4Arg()) |
1685 assert_equal(1, !range(5)->empty()) | 1685 assert_equal(1, !range(5)->empty()) |
1686 assert_equal([0, 1, 2], --3->range()) | 1686 assert_equal([0, 1, 2], --3->range()) |
1687 | 1687 |
1688 call CheckDefFailure(["let x = 'yes'->Echo"], 'E107:') | 1688 call CheckDefFailure(["let x = 'yes'->Echo"], 'E107:') |
1689 enddef | 1689 enddef |