1
0
forked from aniani/vim

patch 9.0.1152: class "implements" argument not implemented

Problem:    Class "implements" argument not implemented.
Solution:   Implement "implements" argument.  Add basic checks for when a
            class implements an interface.
This commit is contained in:
Bram Moolenaar
2023-01-06 18:42:20 +00:00
parent 5bcd29b84e
commit 94674f2223
8 changed files with 249 additions and 14 deletions

View File

@@ -2913,7 +2913,7 @@ set_cmdarg(exarg_T *eap, char_u *oldarg)
int
eval_variable(
char_u *name,
int len, // length of "name"
int len, // length of "name" or zero
scid_T sid, // script ID for imported item or zero
typval_T *rettv, // NULL when only checking existence
dictitem_T **dip, // non-NULL when typval's dict item is needed
@@ -2923,12 +2923,15 @@ eval_variable(
typval_T *tv = NULL;
int found = FALSE;
hashtab_T *ht = NULL;
int cc;
int cc = 0;
type_T *type = NULL;
// truncate the name, so that we can use strcmp()
cc = name[len];
name[len] = NUL;
if (len > 0)
{
// truncate the name, so that we can use strcmp()
cc = name[len];
name[len] = NUL;
}
// Check for local variable when debugging.
if ((tv = lookup_debug_var(name)) == NULL)
@@ -3095,7 +3098,8 @@ eval_variable(
}
}
name[len] = cc;
if (len > 0)
name[len] = cc;
return ret;
}