patch 9.0.1951: Vim9: hard to debug vim9_class errors from CI
Problem: Vim9: hard to debug vim9_class errors from CI
Solution: Include the line number in assert_xxx() calls. Include the
entire error message in the tests. Fix the indentation in the
test file. Add tags for new error codes.
closes: #13206
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt
index 5cbdc72..6b51e86 100644
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -258,10 +258,15 @@
step the object variables of the parent class are initialized first. There is
no need to call "super()" or "new()" on the parent.
- *E1365*
+ *E1365*
When defining the new() method the return type should not be specified. It
always returns an object of the class.
+ *E1386*
+When invoking an object method, the method name should be preceded by the
+object variable name. A object method cannot be invoked using the class
+name.
+
==============================================================================
3. Class Variables and Methods *Vim9-class-member*
@@ -282,7 +287,7 @@
Since the name is used as-is, shadowing the name by a method argument name
or local variable name is not allowed.
- *E1374* *E1375*
+ *E1374* *E1375* *E1384* *E1385*
To access a class member outside of the class where it is defined, the class
name prefix must be used. A class member cannot be accessed using an object.