]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
runtime(doc): Update vim9class help (#13292)
authorYegappan Lakshmanan <4298407+yegappan@users.noreply.github.com>
Fri, 6 Oct 2023 17:24:10 +0000 (10:24 -0700)
committerGitHub <noreply@github.com>
Fri, 6 Oct 2023 17:24:10 +0000 (19:24 +0200)
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/doc/vim9class.txt

index 3e5493f20375ee69247f0c3cc7fc0ab7240a8d60..00bdf369eb641b508c4a171280a85ea3d41bef72 100644 (file)
@@ -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 some other languages).
 
                                                *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 list of values.  Example: >
                Black
        :endenum
 
-TODO: more explanation
-
 
 ==============================================================================