1
0
forked from aniani/vim

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>
This commit is contained in:
Yegappan Lakshmanan
2023-09-28 23:06:48 +02:00
committed by Christian Brabandt
parent 413f83990f
commit b90e3bc491
6 changed files with 1567 additions and 1565 deletions

View File

@@ -4479,6 +4479,9 @@ E1380 vim9class.txt /*E1380*
E1381 vim9class.txt /*E1381*
E1382 vim9class.txt /*E1382*
E1383 vim9class.txt /*E1383*
E1384 vim9class.txt /*E1384*
E1385 vim9class.txt /*E1385*
E1386 vim9class.txt /*E1386*
E1387 vim9class.txt /*E1387*
E1388 vim9class.txt /*E1388*
E1389 vim9class.txt /*E1389*

View File

@@ -258,10 +258,15 @@ If the class extends a parent class, the same thing happens. In the second
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 @@ prefix in the class where they are defined: >
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.