1
0
forked from aniani/vim

patch 9.0.1123: class function not implemented yet

Problem:    Class function not implemented yet.
Solution:   Implement defining and calling a class function.
This commit is contained in:
Bram Moolenaar
2023-01-01 12:58:33 +00:00
parent 9f2d97efe2
commit 6bafdd41cb
6 changed files with 174 additions and 72 deletions

View File

@@ -587,7 +587,8 @@ compile_load(
}
else
{
lvar_T lvar;
lvar_T lvar;
class_T *cl = NULL;
if (lookup_local(*arg, len, &lvar, cctx) == OK)
{
@@ -602,6 +603,10 @@ compile_load(
else
gen_load = TRUE;
}
else if (class_member_exists(name, &cl, &idx, cctx))
{
res = generate_CLASSMEMBER(cctx, TRUE, cl, idx);
}
else
{
// "var" can be script-local even without using "s:" if it