Mercurial > vim
diff src/vim9compile.c @ 29008:49d8b54802f3 v8.2.5026
patch 8.2.5026: Vim9: a few lines not covered by tests
Commit: https://github.com/vim/vim/commit/31d9948e3a2529c2f619d56bdb48291dc261233d
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu May 26 22:24:43 2022 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 26 May 2022 23:30:05 +0200 |
parents | 0e9642706a59 |
children | fab3a46d0af7 |
line wrap: on
line diff
--- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -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)