diff options
author | h-east <h.east.727@gmail.com> | 2023-09-28 22:18:19 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-09-28 22:18:19 +0200 |
commit | db38552dcdc7460459df8bf5cf02666256045308 (patch) | |
tree | 79c3631e1c83ad547356bea130ac9e247216dc87 /runtime | |
parent | 03ca4002c1dcd34c4b17fe4a491b02d77ec2c887 (diff) |
patch 9.0.1948: Vim9: object variable "this." should only be used in constructorv9.0.1948
Problem: Vim9: object variable "this." should only be used in
constructor
Solution: Disallow to this in normal object methods (other than
constructors)
closes: #13152
closes: #13212
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/tags | 1 | ||||
-rw-r--r-- | runtime/doc/vim9class.txt | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/runtime/doc/tags b/runtime/doc/tags index 918e767721..13baf8fd17 100644 --- a/runtime/doc/tags +++ b/runtime/doc/tags @@ -4483,6 +4483,7 @@ E1387 vim9class.txt /*E1387* E1388 vim9class.txt /*E1388* E1389 vim9class.txt /*E1389* E139 message.txt /*E139* +E1390 vim9class.txt /*E1390* E140 message.txt /*E140* E1400 builtin.txt /*E1400* E1401 builtin.txt /*E1401* diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt index b230cb8007..7b9f8b4a6c 100644 --- a/runtime/doc/vim9class.txt +++ b/runtime/doc/vim9class.txt @@ -216,7 +216,8 @@ see this pattern: > this.col = col enddef endclass - +< + *E1390* Not only is this text you need to write, it also has the type of each variables twice. Since this is so common a shorter way to write new() is provided: > |