diff runtime/doc/vim9class.txt @ 33891:56b32a00f325

runtime(doc): update todo items (#13631) Commit: https://github.com/vim/vim/commit/563e6440bf00f2f52de8412d4f967ea224467053 Author: Yegappan Lakshmanan <4298407+yegappan@users.noreply.github.com> Date: Tue Dec 5 08:19:06 2023 -0800 runtime(doc): update todo items (https://github.com/vim/vim/issues/13631) Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Dec 2023 15:16:27 +0100
parents af1b18018eeb
children 050160b94f02
line wrap: on
line diff
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -700,7 +700,13 @@ the name, you can define the constructor
 
 	def new(this.name, this.age = v:none, this.gender = v:none)
 	enddef
-<							*E1328*
+<
+When using the default new() method, if the order of the object variables in
+the class is changed later, then all the callers of the default new() method
+needs to change.  To avoid this, the new() method can be explicitly defined
+without any arguments.
+
+							*E1328*
 Note that you cannot use another default value than "v:none" here.  If you
 want to initialize the object variables, do it where they are declared.  This
 way you only need to look in one place for the default values.