patch 9.0.2051: Vim9: wrong error for non-existing object var
Problem: Vim9: wrong error for non-existing object var
Solution: mention object or class depending on whether
the var is an object or class variable.
closes: #13384
closes: #13387
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
diff --git a/src/vim9class.c b/src/vim9class.c
index bfa6149..a93cb29 100644
--- a/src/vim9class.c
+++ b/src/vim9class.c
@@ -2340,7 +2340,8 @@
}
if (did_emsg == did_emsg_save)
- member_not_found_msg(cl, is_object, name, len);
+ member_not_found_msg(cl, is_object ? VAR_OBJECT : VAR_CLASS, name,
+ len);
}
return FAIL;