changeset 33490:33593174288b

runtime(doc): Update vim9class help (#13292) Commit: https://github.com/vim/vim/commit/26e8f7b0ab451e76319d113038c86c79488bbbc4 Author: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com> Date: Fri Oct 6 10:24:10 2023 -0700 runtime(doc): Update vim9class help (https://github.com/vim/vim/issues/13292) Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 06 Oct 2023 19:30:09 +0200
parents f7ca0c593f04
children e6c00b4c3ee5
files runtime/doc/vim9class.txt
diffstat 1 files changed, 11 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -413,7 +413,9 @@ prefix when defining the method: >
 						*E1373*
 A class extending the abstract class must implement all the abstract methods.
 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
 
 						*E1356* *E1357* *E1358*
 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
-base class can be called by prefixing "super.".
+argument types and return type) must be exactly the 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.  The method of the base class can be called by
+prefixing "super.".
 
 						*E1377*
 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*
 
+{not implemented yet}
+
 A type definition is giving a name to a type specification.  For Example: >
 
 	:type ListOfStrings list<string>
 
-TODO: more explanation
-
 
 ==============================================================================
 
 8.  Enum					*Vim9-enum* *:enum* *:endenum*
 
+{not implemented yet}
+
 An enum is a type that can have one of a list of values.  Example: >
 
 	:enum Color
@@ -759,8 +765,6 @@ An enum is a type that can have one of a
 		Black
 	:endenum
 
-TODO: more explanation
-
 
 ==============================================================================