Skip to content

Commit a4bd928

Browse files
committed
Update vim9class.{txt,jax}
1 parent 43bf779 commit a4bd928

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

doc/vim9class.jax

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*vim9class.txt* For Vim バージョン 9.1. Last change: 2025 Jul 24
1+
*vim9class.txt* For Vim バージョン 9.1. Last change: 2025 Aug 27
22

33

44
VIMリファレンスマニュアル by Bram Moolenaar
@@ -276,7 +276,7 @@ new() メソッドは、"_new()" を使用して protected メソッドにする
276276

277277
3. クラス変数とメソッド *Vim9-class-member*
278278

279-
*:static* *E1337* *E1338* *E1368*
279+
*:static* *E1329* *E1337* *E1338* *E1368*
280280
クラスメンバは "static" で宣言される。これらは、定義されているクラス内でプリ
281281
フィックスなしの名前によって使用される: >
282282
@@ -510,12 +510,18 @@ const 変数はインターフェイスではサポートされていない。
510510
<
511511
抽象クラスの静的メソッドを抽象メソッドにすることはできない。
512512

513+
*E1404*
514+
インターフェイスメソッドは抽象メソッドにすることはできない。
515+
513516
*E1373*
514517
抽象クラスを拡張する非抽象クラスは、すべての抽象メソッドを実装する必要がある。
515518
シグネチャ (引数、引数の型、戻り値の型) はまったく同じである必要がある。メソッ
516519
ドの戻り値の型がクラスの場合、そのクラスまたはそのサブクラスの 1 つを拡張メソッ
517520
ドで使用できる。
518521

522+
*E1431*
523+
抽象スーパークラス内の抽象メソッドは呼び出すことができない。
524+
519525
==============================================================================
520526

521527
5. インターフェイスを使う *Vim9-using-interface*
@@ -634,6 +640,7 @@ Shape, Square および Triangle を使用した上記の例は、オブジェ
634640

635641
オブジェクト変数の初期化 ~
636642

643+
*E1430*
637644
変数の型がクラスで明示的に指定されていない場合、クラス定義時に "any" に設定さ
638645
れる。オブジェクトがクラスからインスタンス化されると、変数の型が設定される。
639646

@@ -946,9 +953,9 @@ Note メソッド名は "new" で始まる必要があることに注意。"new(
946953
Green, Blue, Black
947954
endenum
948955
<
949-
*enumvalue* *E1422*
956+
*enumvalue* *E1422* *E1428*
950957
列挙値はコンマで区切られる。複数の列挙値を 1 行にリストできる。最後の列挙値の
951-
後にコンマを付けてはならない。
958+
後にコンマを付けてはならない。重複した列挙値は許可されない。
952959

953960
列挙値には、列挙名に続いて値の名前を使用してアクセスする: >
954961
@@ -1008,7 +1015,7 @@ Note メソッド名は "new" で始まる必要があることに注意。"new(
10081015
列挙型とその値は不変である。数値型または文字列型として使用することはできない。
10091016
列挙値は変更可能なインスタンス変数を宣言できる。
10101017

1011-
*enum-name*
1018+
*enum-name* *E1427*
10121019
各列挙値オブジェクトには、列挙値の名前を含む "name" インスタンス変数がある。こ
10131020
れは読み取り専用の変数である。
10141021

en/vim9class.txt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*vim9class.txt* For Vim version 9.1. Last change: 2025 Jul 24
1+
*vim9class.txt* For Vim version 9.1. Last change: 2025 Aug 27
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -282,7 +282,7 @@ name.
282282

283283
3. Class Variables and Methods *Vim9-class-member*
284284

285-
*:static* *E1337* *E1338* *E1368*
285+
*:static* *E1329* *E1337* *E1338* *E1368*
286286
Class members are declared with "static". They are used by the name without a
287287
prefix in the class where they are defined: >
288288
@@ -515,12 +515,18 @@ prefix when defining the method: >
515515
<
516516
A static method in an abstract class cannot be an abstract method.
517517

518+
*E1404*
519+
An interface method cannot be an abstract method.
520+
518521
*E1373*
519522
A non-abstract class extending the abstract class must implement all the
520523
abstract methods. The signature (arguments, argument types and return type)
521524
must be exactly the same. If the return type of a method is a class, then
522525
that class or one of its subclasses can be used in the extended method.
523526

527+
*E1431*
528+
An abstract method in an abstract super class cannot be invoked.
529+
524530
==============================================================================
525531

526532
5. Using an interface *Vim9-using-interface*
@@ -637,6 +643,7 @@ object variable name used in a super class cannot be reused in a child class.
637643

638644
Object Variable Initialization ~
639645

646+
*E1430*
640647
If the type of a variable is not explicitly specified in a class, then it is
641648
set to "any" during class definition. When an object is instantiated from the
642649
class, then the type of the variable is set.
@@ -959,10 +966,10 @@ An enum is a type that can have one of a list of values. Example: >
959966
Green, Blue, Black
960967
endenum
961968
<
962-
*enumvalue* *E1422*
969+
*enumvalue* *E1422* *E1428*
963970
The enum values are separated by commas. More than one enum value can be
964971
listed in a single line. The final enum value should not be followed by a
965-
comma.
972+
comma. Duplicate enum values are not allowed.
966973

967974
An enum value is accessed using the enum name followed by the value name: >
968975
@@ -1021,7 +1028,7 @@ The following example shows an enum with object variables and methods: >
10211028
Enums and their values are immutable. They cannot be utilized as numerical or
10221029
string types. Enum values can declare mutable instance variables.
10231030

1024-
*enum-name*
1031+
*enum-name* *E1427*
10251032
Each enum value object has a "name" instance variable which contains the name
10261033
of the enum value. This is a readonly variable.
10271034

0 commit comments

Comments
 (0)