1
0
forked from aniani/vim

runtime(doc): Update vim9class help (#13292)

Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Yegappan Lakshmanan 2023-10-06 10:24:10 -07:00 committed by GitHub
parent a991ce9c08
commit 26e8f7b0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,7 +413,9 @@ prefix when defining the method: >
*E1373* *E1373*
A class extending the abstract class must implement all the abstract methods. A class extending the abstract class must implement all the abstract methods.
The signature (arguments, argument types and return type) must be exactly the The signature (arguments, argument types and return type) must be exactly the
same. Class methods in an abstract class can also be abstract methods. same. If the return type of a method is a class, then that class or one of
its subclasses can be used in the extended method. Class methods in an
abstract class can also be abstract methods.
============================================================================== ==============================================================================
@ -548,8 +550,10 @@ is not possible to override them (unlike some other languages).
*E1356* *E1357* *E1358* *E1356* *E1357* *E1358*
Object methods of the base class can be overruled. The signature (arguments, Object methods of the base class can be overruled. The signature (arguments,
argument types and return type) must be exactly the same. The method of the argument types and return type) must be exactly the same. If the return type
base class can be called by prefixing "super.". of a method is a class, then that class or one of its subclasses can be used
in the extended method. The method of the base class can be called by
prefixing "super.".
*E1377* *E1377*
The access level of a method (public or private) in a child class should be The access level of a method (public or private) in a child class should be
@ -738,17 +742,19 @@ constructor methods.
7. Type definition *Vim9-type* *:type* 7. Type definition *Vim9-type* *:type*
{not implemented yet}
A type definition is giving a name to a type specification. For Example: > A type definition is giving a name to a type specification. For Example: >
:type ListOfStrings list<string> :type ListOfStrings list<string>
TODO: more explanation
============================================================================== ==============================================================================
8. Enum *Vim9-enum* *:enum* *:endenum* 8. Enum *Vim9-enum* *:enum* *:endenum*
{not implemented yet}
An enum is a type that can have one of a list of values. Example: > An enum is a type that can have one of a list of values. Example: >
:enum Color :enum Color
@ -759,8 +765,6 @@ An enum is a type that can have one of a list of values. Example: >
Black Black
:endenum :endenum
TODO: more explanation
============================================================================== ==============================================================================