Mercurial > vim
comparison src/vim9compile.c @ 21465:b5d4ab124782 v8.2.1283
patch 8.2.1283: Vim9: error for misplaced -> lacks argument
Commit: https://github.com/vim/vim/commit/637cd7d1c9fa0ee47951ccdc310a388cb7ecfada
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jul 23 19:06:23 2020 +0200
patch 8.2.1283: Vim9: error for misplaced -> lacks argument
Problem: Vim9: error for misplaced -> lacks argument.
Solution: Use the pointer before it was advanced.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 23 Jul 2020 19:15:03 +0200 |
parents | 7f36d36f7195 |
children | 49072a858baf |
comparison
equal
deleted
inserted
replaced
21464:a6873b0067e5 | 21465:b5d4ab124782 |
---|---|
3759 if (generate_PCALL(cctx, argcount, end_leader, type, TRUE) == FAIL) | 3759 if (generate_PCALL(cctx, argcount, end_leader, type, TRUE) == FAIL) |
3760 return FAIL; | 3760 return FAIL; |
3761 } | 3761 } |
3762 else if (*p == '-' && p[1] == '>') | 3762 else if (*p == '-' && p[1] == '>') |
3763 { | 3763 { |
3764 char_u *pstart = p; | |
3765 | |
3764 if (generate_ppconst(cctx, ppconst) == FAIL) | 3766 if (generate_ppconst(cctx, ppconst) == FAIL) |
3765 return FAIL; | 3767 return FAIL; |
3766 | 3768 |
3767 // something->method() | 3769 // something->method() |
3768 // Apply the '!', '-' and '+' first: | 3770 // Apply the '!', '-' and '+' first: |
3784 { | 3786 { |
3785 // method call: list->method() | 3787 // method call: list->method() |
3786 p = *arg; | 3788 p = *arg; |
3787 if (!eval_isnamec1(*p)) | 3789 if (!eval_isnamec1(*p)) |
3788 { | 3790 { |
3789 semsg(_(e_trailing_arg), p); | 3791 semsg(_(e_trailing_arg), pstart); |
3790 return FAIL; | 3792 return FAIL; |
3791 } | 3793 } |
3792 if (ASCII_ISALPHA(*p) && p[1] == ':') | 3794 if (ASCII_ISALPHA(*p) && p[1] == ':') |
3793 p += 2; | 3795 p += 2; |
3794 for ( ; eval_isnamec1(*p); ++p) | 3796 for ( ; eval_isnamec1(*p); ++p) |