summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-12-08 15:32:33 +0000
committerBram Moolenaar <Bram@vim.org>2022-12-08 15:32:33 +0000
commit00b28d6c23d8e662cab27e461825777c0a2e387a (patch)
treeba11ed85b20cf03491e0f24b6d5bf348d2c19388 /runtime
parent038e6d20e680ce8c850d07f6b035c4e1904c1201 (diff)
downloadvim-git-00b28d6c23d8e662cab27e461825777c0a2e387a.tar.gz
patch 9.0.1031: Vim9 class is not implemented yetv9.0.1031
Problem: Vim9 class is not implemented yet. Solution: Add very basic class support.
Diffstat (limited to 'runtime')
-rw-r--r--runtime/doc/vim9class.txt9
1 files changed, 6 insertions, 3 deletions
diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt
index cb86b4d13..b018a105c 100644
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -336,6 +336,9 @@ Defining a class ~
A class is defined between `:class` and `:endclass`. The whole class is
defined in one script file. It is not possible to add to a class later.
+A class can only be defined in a |Vim9| script file. *E1315*
+A class cannot be defined inside a function.
+
It is possible to define more than one class in a script file. Although it
usually is better to export only one main class. It can be useful to define
types, enums and helper classes though.
@@ -369,9 +372,9 @@ A class can extend one other class.
*implements*
A class can implement one or more interfaces.
*specifies*
-A class can declare it's interface, the object members and methods, with a
+A class can declare its interface, the object members and methods, with a
named interface. This avoids the need for separately specifying the
-interface, which is often done an many languages, especially Java.
+interface, which is often done in many languages, especially Java.
Defining an interface ~
@@ -634,7 +637,7 @@ directly writing you get an error, which makes you wonder if you actually want
to allow that. This helps writing code with fewer mistakes.
-Making object membes private with an underscore ~
+Making object members private with an underscore ~
When an object member is private, it can only be read and changed inside the
class (and in sub-classes), then it cannot be used outside of the class.