comparison runtime/doc/vim9class.txt @ 33434:484543479bd7

runtime(doc): fix typos. Commit: https://github.com/vim/vim/commit/ba77bbb5c775663a8b55871f753d7b1b570bb9ba Author: h_east <h.east.727@gmail.com> Date: Tue Oct 3 04:47:13 2023 +0900 runtime(doc): fix typos. * Fix typo in document (Related: https://github.com/vim/vim/issues/12516) * Fix E1363 duplication * Fix one more typo. Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Mon, 02 Oct 2023 22:00:05 +0200
parents 97ceabebaeaf
children 33593174288b
comparison
equal deleted inserted replaced
33433:c66a146cfebc 33434:484543479bd7
302 endclass 302 endclass
303 < 303 <
304 *class-method* 304 *class-method*
305 Class methods are also declared with "static". They can use the class 305 Class methods are also declared with "static". They can use the class
306 variables but they have no access to the object variables, they cannot use the 306 variables but they have no access to the object variables, they cannot use the
307 "this" keyword. 307 "this" keyword:
308 > 308 >
309 class OtherThing 309 class OtherThing
310 this.size: number 310 this.size: number
311 static totalSize: number 311 static totalSize: number
312 312
654 654
655 When a variable is declared to have the type of an object, but it is not 655 When a variable is declared to have the type of an object, but it is not
656 initialized, the value is null. When trying to use this null object Vim often 656 initialized, the value is null. When trying to use this null object Vim often
657 does not know what class was supposed to be used. Vim then cannot check if 657 does not know what class was supposed to be used. Vim then cannot check if
658 a variable name is correct and you will get an "Using a null object" error, 658 a variable name is correct and you will get an "Using a null object" error,
659 even when the variable name is invalid. *E1360* *E1362* *E1363* 659 even when the variable name is invalid. *E1360* *E1362*
660 660
661 661
662 Default constructor ~ 662 Default constructor ~
663 *default-constructor* 663 *default-constructor*
664 In case you define a class without a new() method, one will be automatically 664 In case you define a class without a new() method, one will be automatically