diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-08-20 18:20:17 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-08-20 18:20:17 +0200 |
commit | 6ac1544e13d78e0deeca1f357d1d73947180171c (patch) | |
tree | 87cdbb42a368d402fce1773a4b9321cef96e8fc9 /runtime | |
parent | 6cc8bc836616e9b0cda1d8cb6993a958f569ad7b (diff) |
patch 9.0.1760: vim9 class problem with new() constructorv9.0.1760
Problem: vim9 class problem with new() constructor
Solution: Don't allow a return type for the new() class constructor.
closes: #12863
closes: #12040
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/vim9class.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt index 6acbca5439..a68b97c87b 100644 --- a/runtime/doc/vim9class.txt +++ b/runtime/doc/vim9class.txt @@ -232,6 +232,9 @@ If the class extends a parent class, the same thing happens. In the second step the members of the parent class are done first. There is no need to call "super()" or "new()" on the parent. +When defining the new() method the return type should not be specified. It +always returns an object of the class. + ============================================================================== 3. class members and functions *Vim9-class-member* |