0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.5026: Vim9: a few lines not covered by tests

Problem:    Vim9: a few lines not covered by tests.
Solution:   Delete dead code.  Add a few test cases. make "12->func()" work.
This commit is contained in:
Bram Moolenaar
2022-05-26 22:24:43 +01:00
parent 5cb53b7afe
commit 31d9948e3a
7 changed files with 182 additions and 51 deletions

View File

@@ -3001,6 +3001,7 @@ compile_def_function(
* 0z1234->func() should not be confused with a zero line number
* "++nr" and "--nr" are eval commands
* in "$ENV->func()" the "$" is not a range
* "123->func()" is a method call
*/
cmd = ea.cmd;
if ((*cmd != '$' || starts_with_colon)
@@ -3008,7 +3009,8 @@ compile_def_function(
|| !(*cmd == '\''
|| (cmd[0] == '0' && cmd[1] == 'z')
|| (cmd[0] != NUL && cmd[0] == cmd[1]
&& (*cmd == '+' || *cmd == '-')))))
&& (*cmd == '+' || *cmd == '-'))
|| number_method(cmd))))
{
ea.cmd = skip_range(ea.cmd, TRUE, NULL);
if (ea.cmd > cmd)