1
0
Fork 0
mirror of https://github.com/vim/vim synced 2025-03-23 10:15:11 +01:00
Commit graph

52 commits

Author SHA1 Message Date
Doug Kearns
49a35f67eb
runtime(doc): Fix enum example syntax
An ex-colon is not allowed before endenum.  As no other examples in the
file use an ex-colon remove them both.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 15:33:12 +01:00
Yegappan Lakshmanan
56d45f1b66
patch 9.1.0850: Vim9: cannot access nested object inside objects
Problem:  Vim9: cannot access nested object inside objects
          (lifepillar, 91khr, mawkish)
Solution: Add support for accessing an object member using a "any"
          variable type (Yegappan Lakshmanan)

fixes: 
fixes: 
fixes: 
fixes: 
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 20:01:06 +01:00
Yegappan Lakshmanan
c51578fed8
patch 9.1.0314: Vim9: Can define a class in a function
Problem:  Vim9: Can define a class in a function
          (Doug Kearns)
Solution: Give an error for a class defined in a function,
          slightly reword some public error messages
          (Yegappan Lakshmanan)

fixes: 
fixes: 
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 18:04:53 +02:00
Aliaksei Budavei
9574022580
runtime(doc): Fill in a few details regarding :enums ()
- Mention the support of eval() for enumeration values.

- Clarify the extent of immutability for enumeration values.

- Specify the requirements for class methods to meet for
  class variable initialisation and their use in nested
  functions and lambda expressions.

- Remove a duplicate sentence that describes how to access
  parent class methods in derivative classes (see another
  "copy" two paragraphs below).


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 22:05:33 +02:00
Yegappan Lakshmanan
3164cf8f12
patch 9.1.0219: Vim9: No enum support
Problem:  No enum support
Solution: Implement enums for Vim9 script
          (Yegappan Lakshmanan)

closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:38:28 +01:00
Yegappan Lakshmanan
d3eae7bc11
patch 9.1.0148: Vim9: can't call internal methods with objects
Problem:  Vim9: can't call internal methods with objects
Solution: Add support for empty(), len() and string() function
          calls for objects (Yegappan Lakshmanan)

closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 16:34:51 +01:00
Yegappan Lakshmanan
4f32c83a77
patch 9.1.0020: Vim9: cannot compile all methods in a class
Problem:  Vim9: cannot compile all methods in a class
Solution: Support compiling all the methods in a class using :defcompile
          (Yegappan Lakshmanan)

closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:41:09 +01:00
Aliaksei Budavei
b21499537f
runtime(doc): Improve the documentation for Vim9 classes ()
* Emend textual typos
* Emend syntactic errors in examples
* Acknowledge no support for abstract static methods
* Acknowledge the non-ubiquity of instance qualification

"This" was never allowed in method declarations, e.g.:
    class A
        def this.M()
        enddef
    endclass

and, since patch 9.0.2167, "this" can no longer be used in field
declarations, e.g.:
    class B
        var this.f: string
    endclass

* Recognise abstract child classes
* Reword an ambiguous turn of phrase

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-07 15:52:10 +01:00
Christian Brabandt
b4ddc6c11e
patch 9.1.0000: Vim 9.1 release
Problem:  Need a new release
Solution: Release Vim 9.1

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-02 16:51:11 +01:00
Christian Brabandt
6c1afa3d0b
runtime(doc): add missing help tags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 20:50:51 +01:00
Aliaksei Budavei
0aed99abf7
runtime(doc): correct the :public example ()
The current example is no longer supported (E1331), as of
patch 9.0.2167.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:08:24 +01:00
errael
92feeaffc2
runtime(doc): add help tag multiple-constructors. ()
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:07:09 +01:00
Ernie Rael
4e28631f91
runtime(doc): Clarify that new() is not static
closes: 

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-24 11:03:31 +01:00
Yegappan Lakshmanan
49cdd629a3
runtime(doc): list of new/changed features in version9.txt
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-24 11:03:06 +01:00
errael
1d4fcfe551
runtime(doc): add some error codes to :help vim9class ()
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:34:15 +01:00
Yegappan Lakshmanan
ff6f0d5c38
patch 9.0.2182: Vim9: need a way to reserve future extension
Problem:  Vim9: need a way to reserve future extension
Solution: reserve double underscore prefix for future use
          (Yegappan Lakshmanan)

related: 
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 16:46:18 +01:00
Yegappan Lakshmanan
e5437c5427
patch 9.0.2170: Vim9: no support for const/final class/objects vars
Problem:  Vim9: no support for const/final class/objects vars
Solution: Support final and const object and class variables

closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:11:19 +01:00
Dominique Pellé
17dca3cb97
runtime(doc): grammar & typo fixes
closes: 
2023-12-14 20:36:32 +01:00
Doug Kearns
74da0ee0a2
patch 9.0.2167: Vim9: not consistently using :var for declarations
Problem:  Vim9-script object/class variable declarations use syntax
	  that is inconsistent with the rest of the language.
Solution: Use :var to declare object and class variables.

closes: 

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:26:26 +01:00
Yegappan Lakshmanan
2a71b54d35
patch 9.0.2162: Vim9: type documentation out-dated
Problem:  Vim9: type documentation out-dated
Solution: Update documentation, fix typo in type alias
          definition

closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:03:03 +01:00
Yegappan Lakshmanan
563e6440bf
runtime(doc): update todo items ()
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 17:19:06 +01:00
h_east
596a9f29c8
runtime(doc): Fix whitespace and formatting of some help files ()
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 12:24:23 +00:00
Ernie Rael
03042a2753
patch 9.0.2096: Vim9: confusing usage of private
Problem:  Vim9: confusing usage of private
Solution: clarify and use protected keyword instead

[vim9class] document `_` as protected instead of private

fixes 
closes: 

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 08:53:32 +01:00
Yegappan Lakshmanan
ef9e3f8924
patch 9.0.2084: Vim9: abstract static methods are possible
Problem:  Vim9: abstract static methods are possible
Solution: Disallow abstract static methods

fixes: 
closes: 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:43:57 +01:00
Yegappan Lakshmanan
feaccd2395
patch 9.0.2078: several problems with type aliases
Problem:  several problems with type aliases
Solution: Check for more error conditions, add tests,
          fix issues

Check for more error conditions and add additional tests

fixes  
fixes  
fixes  
closes 

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 15:53:55 +02:00
Yegappan Lakshmanan
ec3cebbd2b
patch 9.0.2076: Vim9: No support for type aliases
Problem:  Vim9: No support for type aliases
Solution: Implement :type command

A type definition is giving a name to a type specification.  This also known
type alias.

	:type ListOfStrings = list<string>

The type alias can be used wherever a built-in type can be used.  The type
alias name must start with an upper case character.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-27 19:35:26 +02:00
Yegappan Lakshmanan
0ab500dede
patch 9.0.2059: outstanding exceptions may be skipped
Problem:  outstanding exceptions may be skipped
Solution: When restoring exception state, process remaining outstanding
          exceptions

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-21 11:59:42 +02:00
Yegappan Lakshmanan
26e8f7b0ab
runtime(doc): Update vim9class help ()
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-06 19:24:10 +02:00
h_east
ba77bbb5c7
runtime(doc): fix typos.
* Fix typo in document (Related: )
* Fix E1363 duplication
* Fix one more typo.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-02 21:47:13 +02:00
Yegappan Lakshmanan
b32064fedb
patch 9.0.1974: vim9: using contra-variant type-checks
Problem:  vim9: using contra-variant type-checks (after v9.0.1959)
Solution: Use invariant type checking instead

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-02 21:43:58 +02:00
Yegappan Lakshmanan
f3b68d4759
patch 9.0.1959: Vim9: methods parameters and types are covariant
Problem:  Vim9: methods parameters and types are covariant
Solution: Support contra-variant type check for object method arguments
          (similar to Dart).

closes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-29 22:50:02 +02:00
Yegappan Lakshmanan
b90e3bc491
patch 9.0.1951: Vim9: hard to debug vim9_class errors from CI
Problem:  Vim9: hard to debug vim9_class errors from CI
Solution: Include the line number in assert_xxx() calls.  Include the
          entire error message in the tests.  Fix the indentation in the
          test file.  Add tags for new error codes.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-28 23:16:35 +02:00
Yegappan Lakshmanan
413f83990f
patch 9.0.1950: Vim9: error codes spread out
Problem:  Vim9: error codes spread out
Solution: group them together and reserve 100
          more for future use

Reserve 100 error codes for future enhancements to the Vim9 class
support

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-28 22:46:37 +02:00
h-east
db38552dcd
patch 9.0.1948: Vim9: object variable "this." should only be used in constructor
Problem:  Vim9: object variable "this." should only be used in
          constructor
Solution: Disallow to this in normal object methods (other than
          constructors)

closes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
2023-09-28 22:18:19 +02:00
Yegappan Lakshmanan
2dede3dbfa
patch 9.0.1945: Vim9: missing support for ro-vars in interface
Problem:  Vim9: missing support for ro-vars in interface
Solution: Support only read-only object variables in an interface,
          add additional checks when parsing class definitions.

closes: 
cloess: 
cloess: .
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-27 19:02:01 +02:00
Yegappan Lakshmanan
c3b315f496
runtime(doc): Vim9: Consistenly use class/object variable and class/object method in help ()
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-24 23:36:17 +02:00
Yegappan Lakshmanan
00cd18222e
patch 9.0.1909: Vim9: problem calling class method from other class
Problem:  Vim9: problem calling class method from other class
Solution: Fix this problem, fix readonly object access, update error
          messages.

Calling a class method from another method without the class name prefix
doesn't work properly.

A readonly object variable is modifiable outside the class using a
nested object assignment.

Remove the unused E1338 error message.

Update error messages.

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-18 19:56:49 +02:00
Yegappan Lakshmanan
7bcd25cad3
patch 9.0.1885: Vim9: no support for abstract methods
Problem:  Vim9: no support for abstract methods
Solution: Add support for defining abstract methods in an abstract class

closes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-08 19:29:31 +02:00
Gianmaria Bajo
4b9777a1df
patch 9.0.1821: Vim9 constructors are always static
Problem:  Vim9 constructors are always static
Solution: make the "static" keyword an error

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gianmaria Bajo <mg1979.git@gmail.com>
2023-08-29 22:29:03 +02:00
Yegappan Lakshmanan
cd7293bf6c
patch 9.0.1804: Vim9: no support for private object methods
Problem:  Vim9: no support for private object methods
Solution: Add support for private object/class methods

closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-27 19:18:23 +02:00
Yegappan Lakshmanan
618e47d1cd
patch 9.0.1780: Vim9 type not defined during object creation
Problem:  Vim9 type not defined during object creation
Solution: Define type during object creation and not during class
          definition, parse mulit-line member initializers, fix lock
          initialization

If type is not specified for a member, set it during object creation
instead of during class definition.  Add a runtime type check for the
object member initialization expression

Also, while at it, when copying an object or class, make sure the lock
is correctly initialized.

And finally, parse multi-line member initializers correctly.

closes: 
closes: 
closes: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-08-22 21:29:28 +02:00
Yegappan Lakshmanan
6ac1544e13
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: 
closes: 

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-08-20 18:20:17 +02:00
Bram Moolenaar
71badf9547 Update runtime files 2023-04-22 22:40:14 +01:00
Bram Moolenaar
dd60c365cd Update runtime files 2023-02-27 15:49:53 +00:00
Bram Moolenaar
938ae280c7 Update runtime files. 2023-02-20 20:44:55 +00:00
Bram Moolenaar
be4e01637e Update runtime files. 2023-02-02 13:59:48 +00:00
Bram Moolenaar
1b5f03ec9c Update runtime files 2023-01-09 20:12:45 +00:00
Bram Moolenaar
f1dcd14fc5 Update runtime files 2022-12-31 15:30:45 +00:00
Bram Moolenaar
65b0d16768 patch 9.0.1053: default constructor arguments are not optional
Problem:    Default constructor arguments are not optional.
Solution:   Use "= v:none" to make constructor arguments optional.
2022-12-13 18:43:22 +00:00
Bram Moolenaar
7db29e4b5c Update runtime files 2022-12-11 15:53:04 +00:00