Skip to content

Commit 563e644

Browse files
authored
runtime(doc): update todo items (#13631)
Signed-off-by: Christian Brabandt <[email protected]>
1 parent 0280c0b commit 563e644

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

runtime/doc/todo.txt

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -124,27 +124,18 @@ Further Vim9 improvements:
124124
- Classes and Interfaces. See |vim9-classes|
125125
- "final" object members - can only be set in the constructor.
126126
- Cannot use class type of itself in the method (Issue #12369)
127-
- Cannot use an object method in a lambda #12417
128-
Define all methods before compiling them?
129-
- Cannot call class member of funcref type (Issue #12324)
130-
Also #12081 first case.
131-
- Using list of functions does not work #12081 (repro in later message).
132-
- First argument of call() cannot be "obj.Func". (#11865)
133127
- Getting member of variable with "any" type should be handled at runtime.
134128
Remove temporary solution from #12096 / patch 9.0.1375.
135129
- "obj.Method()" does not always work in a compiled function, assumes "obj"
136130
is a dictionary. #12196 Issue #12024 might be the same problem.
137131
Issue #11822: any.Func() can be a dict or an object call, need to handle
138132
this at runtime. Also see #12198 for an example.
139133
Possibly issue #11981 can be fixed at the same time (has two examples).
140-
- Support export/import of classes and interfaces.
141134
- Make ":defcompile ClassName" compile all functions and methods in the
142135
class.
143136
- Forward declaration of a class? E.g. for Clone() function.
144137
Email lifepillar 2023 Mar 26
145138
- object empty(), len() - can class define a method to be used for them?
146-
- add to help: when using a default new() method then reordering object
147-
members may cause trouble. Can define new() without arguments to avoid.
148139
- When "Meta" is a class, is "const MetaAlias = Meta" allowed? It should
149140
either work or given an error. Possibly give an error now and implement it
150141
later (using a typedef). #12006
@@ -157,7 +148,6 @@ Further Vim9 improvements:
157148
- More efficient way for interface member index than iterating over list?
158149
- a variant of type() that returns a different type for each class?
159150
list<number> and list<string> should also differ.
160-
- implement :type
161151
- implement :enum
162152
- Promise class, could be used to wait on a popup close callback?
163153
- class local to a function
@@ -166,6 +156,8 @@ Further Vim9 improvements:
166156
- When evaluating constants for script variables, some functions could work:
167157
has(featureName), len(someString)
168158
- Implement as part of an expression: ++expr, --expr, expr++, expr--.
159+
- The use of the literal value "null" and the type specific "null_xxx"
160+
values is confusing (#13458, #11770).
169161

170162
Information missing in terminfo:
171163
- Codes used for focus gained and lost termcodes are hard-coded in

runtime/doc/vim9class.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,13 @@ the name, you can define the constructor like this: >
700700
701701
def new(this.name, this.age = v:none, this.gender = v:none)
702702
enddef
703-
< *E1328*
703+
<
704+
When using the default new() method, if the order of the object variables in
705+
the class is changed later, then all the callers of the default new() method
706+
needs to change. To avoid this, the new() method can be explicitly defined
707+
without any arguments.
708+
709+
*E1328*
704710
Note that you cannot use another default value than "v:none" here. If you
705711
want to initialize the object variables, do it where they are declared. This
706712
way you only need to look in one place for the default values.

0 commit comments

Comments
 (0)