mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.3701: Vim9: invalid LHS is not possible
Problem: Vim9: invalid LHS is not possible. Solution: Remove unreachable error message.
This commit is contained in:
@@ -753,6 +753,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
3701,
|
||||
/**/
|
||||
3700,
|
||||
/**/
|
||||
|
@@ -6503,20 +6503,17 @@ compile_lhs(
|
||||
lhs->lhs_member_type = lhs->lhs_type;
|
||||
if (lhs->lhs_has_index)
|
||||
{
|
||||
char_u *after = var_start + lhs->lhs_varlen;
|
||||
char_u *p;
|
||||
|
||||
// Something follows after the variable: "var[idx]" or "var.key".
|
||||
// TODO: should we also handle "->func()" here?
|
||||
if (is_decl)
|
||||
{
|
||||
emsg(_(e_cannot_use_index_when_declaring_variable));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (var_start[lhs->lhs_varlen] == '['
|
||||
|| var_start[lhs->lhs_varlen] == '.')
|
||||
{
|
||||
char_u *after = var_start + lhs->lhs_varlen;
|
||||
char_u *p;
|
||||
|
||||
// Now: var_start[lhs->lhs_varlen] is '[' or '.'
|
||||
// Only the last index is used below, if there are others
|
||||
// before it generate code for the expression. Thus for
|
||||
// "ll[1][2]" the expression is "ll[1]" and "[2]" is the index.
|
||||
@@ -6544,12 +6541,6 @@ compile_lhs(
|
||||
else
|
||||
lhs->lhs_member_type = lhs->lhs_type->tt_member;
|
||||
}
|
||||
else
|
||||
{
|
||||
semsg("Not supported yet: %s", var_start);
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user