1
0
forked from aniani/vim

patch 9.0.1127: no error if function argument shadows class member

Problem:    No error if function argument shadows class member.
Solution:   Give an error for shadowing a class member.
This commit is contained in:
Bram Moolenaar
2023-01-01 19:53:30 +00:00
parent fc966c19f8
commit 6acf757c6a
6 changed files with 82 additions and 57 deletions

View File

@@ -603,7 +603,7 @@ compile_load(
else
gen_load = TRUE;
}
else if (class_member_exists(name, &cl, &idx, cctx))
else if ((idx = class_member_index(*arg, len, &cl, cctx)) >= 0)
{
res = generate_CLASSMEMBER(cctx, TRUE, cl, idx);
}