0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 9.0.1760: vim9 class problem with new() constructor

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>
This commit is contained in:
Yegappan Lakshmanan
2023-08-20 18:20:17 +02:00
committed by Christian Brabandt
parent 6cc8bc8366
commit 6ac1544e13
6 changed files with 152 additions and 8 deletions

View File

@@ -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*