runtime(doc): update enum helptext

Commit: 
https://github.com/vim/vim/commit/4ec93fec125b2743a7f63b4fd3087fa5895eab8b
Author: Yegappan Lakshmanan <yegap...@yahoo.com>
Date:   Mon Apr 14 21:14:33 2025 +0200

    runtime(doc): update enum helptext
    
    closes: https://github.com/vim/vim/issues/17112
    
    Signed-off-by: Yegappan Lakshmanan <yegap...@yahoo.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt
index 5d6f7fca1..519545677 100644
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -1,4 +1,4 @@
-*vim9class.txt*        For Vim version 9.1.  Last change: 2025 Apr 05
+*vim9class.txt*        For Vim version 9.1.  Last change: 2025 Apr 13
 
 
                  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -1067,6 +1067,22 @@ The above enum definition is equivalent to the following 
class definition: >
       public const ordinal: number
     endclass
 <
+A enum can contain object variables and methods just like a regular
+class: >
+
+    enum Color
+       Cyan([0, 255, 255]),
+       Magenta([255, 0, 255]),
+       Gray([128, 128, 128])
+
+       var rgb_values: list<number>
+
+       def Get_RGB(): list<number>
+           return this.rgb_values
+       enddef
+    endenum
+    echo Color.Magenta.Get_RGB()
+<
 ==============================================================================
 
 9.  Rationale

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1u4PVS-0032qm-PL%40256bit.org.

Raspunde prin e-mail lui