Update runtime files.

This commit is contained in:
Bram Moolenaar
2023-02-20 20:44:55 +00:00
parent 6b066c6d8f
commit 938ae280c7
53 changed files with 635 additions and 237 deletions

View File

@ -1,4 +1,4 @@
*vim9class.txt* For Vim version 9.0. Last change: 2023 Jan 17
*vim9class.txt* For Vim version 9.0. Last change: 2023 Feb 19
VIM REFERENCE MANUAL by Bram Moolenaar
@ -471,14 +471,14 @@ Items in a class ~
*E1318* *E1325* *E1326*
Inside a class, in betweeen `:class` and `:endclass`, these items can appear:
- An object member declaration: >
this._memberName: memberType
this.memberName: memberType
this._memberName: memberType
this.memberName: memberType
public this.memberName: memberType
- A constructor method: >
def new(arguments)
def newName(arguments)
def new(arguments)
def newName(arguments)
- An object method: >
def SomeMethod(arguments)
def SomeMethod(arguments)
< *E1329*
For the object member the type must be specified. The best way is to do this
explicitly with ": {type}". For simple types you can also use an initializer,
@ -520,6 +520,15 @@ name, with a hint about what it provides.
An interface can only be defined in a |Vim9| script file. *E1342*
null object ~
When a variable is decleared to have the type of an object, but it is not
initialized, the value is null. When trying to use this null object Vim often
does not know what class was supposed to be used. Vim then cannot check if
a member name is correct and you will get an "Using a null object" error,
even when the member name is invalid. *E1360*
Default constructor ~
In case you define a class without a new() method, one will be automatically