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 #13434
fixes #13437
fixes #13438
closes #13441
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 : #13407
Signed-off-by: Christian Brabandt <cb@256bit.org >
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com >
2023-10-27 19:35:26 +02:00
Illia Bobyr
8079917447
patch 9.0.2041: trim(): hard to use default mask
...
Problem: trim(): hard to use default mask (partly revert v9.0.2040)
Solution: use default mask when it is empty
The default 'mask' value is pretty complex, as it includes many
characters. Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.
Currently, an empty 'mask' will make 'trim()' call return 'text' value
that is passed in unmodified. It is unlikely that someone is using it,
so the chances of scripts being broken by this change are low.
Also, this reverts commit 9.0.2040 (which uses v:none for the default
and requires to use an empty string instead).
closes : #13358
Signed-off-by: Christian Brabandt <cb@256bit.org >
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com >
2023-10-17 18:06:00 +02:00
Illia Bobyr
6e6386716f
patch 9.0.2040: trim(): hard to use default mask
...
Problem: trim(): hard to use default mask
Solution: Use default 'mask' when it is v:none
The default 'mask' value is pretty complex, as it includes many
characters. Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.
'v:none' is already used to mean "use the default argument value" in
user defined functions. See |none-function_argument| in help.
closes : #13363
Signed-off-by: Christian Brabandt <cb@256bit.org >
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com >
2023-10-17 11:09:45 +02:00
Christian Brabandt
ee17b6f70d
patch 9.0.1886: Various Typos
...
Problem: Various Typos
Solution: Fix Typos
This is a collection of typo related commits.
closes : #12753
closes : #13016
Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl >
Co-authored-by: zeertzjq <zeertzjq@outlook.com >
Co-authored-by: Viktor Szépe <viktor@szepe.net >
Co-authored-by: nuid64 <lvkuzvesov@proton.me >
Co-authored-by: Meng Xiangzhuo <aumo@foxmail.com >
Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com >
Signed-off-by: Christian Brabandt <cb@256bit.org >
2023-09-09 11:31:38 +02:00
Yegappan Lakshmanan
eb91e24d5e
patch 9.0.1829: Vim9 missing access-checks for private vars
...
Problem: Vim9 missing access-checks for private vars
Solution: Use the proper check for private/readonly variable. Access
level for a member cannot be changed in a class implementing an
interface. Update the code indentation
closes : #12978
Signed-off-by: Christian Brabandt <cb@256bit.org >
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com >
Co-authored-by: Ernie Rael <errael@raelity.com >
2023-08-31 18:10:46 +02:00
Ernie Rael
5c018bee0e
patch 9.0.1796: Vim9 problems with null_objects
...
Problem: Vim9 problems with null_objects
Solution: Vim9 improve null_object usage
Fix "xvar == null", where xvar might have been assigned null_object.
Fix compilation failure: "var o2: C = null_object".
closes : #12890
Signed-off-by: Christian Brabandt <cb@256bit.org >
Co-authored-by: Ernie Rael <errael@raelity.com >
2023-08-27 18:40:26 +02:00
LemonBoy
afe0466fb1
patch 9.0.1786: Vim9: need instanceof() function
...
Problem: Vim9: need instanceof() function
Solution: Implement instanceof() builtin
Implemented in the same form as Python's isinstance because it allows
for checking multiple class types at the same time.
closes : #12867
Signed-off-by: Christian Brabandt <cb@256bit.org >
Co-authored-by: LemonBoy <thatlemon@gmail.com >
2023-08-23 21:08:11 +02:00
Bram Moolenaar
be19d78c3d
patch 9.0.1396: sort(list, 'N') does not work in Vim9 script context
...
Problem: sort(list, 'N') does not work in Vim9 script context.
Solution: Convert string to number without giving an error. (closes #12061 )
2023-03-09 22:06:49 +00:00
Bram Moolenaar
5fb78c3fa5
patch 9.0.1380: CTRL-X on 2**64 subtracts two
...
Problem: CTRL-X on 2**64 subtracts two. (James McCoy)
Solution: Correct computation for large number. (closes #12103 )
2023-03-04 20:47:39 +00:00
Yegappan Lakshmanan
032713f829
patch 9.0.1245: code is indented more than necessary
...
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11879 )
2023-01-25 21:05:38 +00:00
Bram Moolenaar
bcf31ec36b
patch 9.0.1134: comparing objects uses identity instead of equality
...
Problem: Comparing objects uses identity instead of equality.
Solution: Compare the object values.
2023-01-02 20:32:24 +00:00
Bram Moolenaar
6ef5471afa
patch 9.0.1095: using freed memory when declaration fails
...
Problem: Using freed memory when declaration fails. (Yegappan Lakshmanan)
Solution: After unreferencing an object set the reference to NULL.
2022-12-25 19:31:36 +00:00
Bram Moolenaar
d28d7b94f5
patch 9.0.1035: object members are not being marked as used
...
Problem: Object members are not being marked as used, garbage collection
may free them.
Solution: Mark object members as used. Fix reference counting.
2022-12-08 20:42:00 +00:00
Bram Moolenaar
00b28d6c23
patch 9.0.1031: Vim9 class is not implemented yet
...
Problem: Vim9 class is not implemented yet.
Solution: Add very basic class support.
2022-12-08 15:32:33 +00:00
Bram Moolenaar
3b8c7083b2
patch 9.0.0978: build errors without the +channel feature
...
Problem: Build errors without the +channel feature. (John Marriott)
Solution: Adjust #ifdefs.
2022-11-30 20:20:56 +00:00
dundargoc
c57b5bcd22
patch 9.0.0828: various typos
...
Problem: Various typos.
Solution: Correct typos. (closes #11432 )
2022-11-02 13:30:51 +00:00
Bram Moolenaar
801cd35e7e
patch 9.0.0715: wrong argument for append() gives two error messages
...
Problem: Wrong argument for append() gives two error messages.
Solution: When getting an error for a number argument don't try using it as
a string. (closes #11335 )
2022-10-10 16:08:16 +01:00
Bram Moolenaar
73e28dcc61
patch 9.0.0491: no good reason to build without the float feature
...
Problem: No good reason to build without the float feature.
Solution: Remove configure check for float and "#ifdef FEAT_FLOAT".
2022-09-17 21:08:33 +01:00
zeertzjq
cd2d5c181a
patch 9.0.0450: return value of argument check functions is inconsistent
...
Problem: Return value of argument check functions is inconsistent.
Solution: Return OK/FAIL instead of TRUE/FALSE. (closes #11112 )
2022-09-12 14:09:30 +01:00
Bakudankun
375141e1f8
patch 9.0.0430: cannot use repeat() with a blob
...
Problem: Cannot use repeat() with a blob.
Solution: Implement blob repeat. (closes #11090 )
2022-09-09 18:46:47 +01:00
Bram Moolenaar
d83392a43a
patch 9.0.0345: error message for list argument could be clearer
...
Problem: Error message for list argument could be clearer.
Solution: Include the argument number. (Yegappan Lakshmanan, closes #11027 )
2022-09-01 12:22:46 +01:00
Yegappan Lakshmanan
04c4c5746e
patch 9.0.0335: checks for Dictionary argument often give a vague error
...
Problem: Checks for Dictionary argument often give a vague error message.
Solution: Give a useful error message. (Yegappan Lakshmanan, closes #11009 )
2022-08-30 19:48:24 +01:00
Bram Moolenaar
1e56bda904
patch 9.0.0104: going beyond allocated memory when evaluating string constant
...
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form.
2022-07-29 15:28:27 +01:00
Bram Moolenaar
70c41241c2
patch 8.2.4934: string interpolation fails when not evaluating
...
Problem: String interpolation fails when not evaluating.
Solution: Skip the expression when not evaluating. (closes #10398 )
2022-05-10 18:11:43 +01:00
Bram Moolenaar
0abc2871c1
patch 8.2.4930: interpolated string expression requires escaping
...
Problem: Interpolated string expression requires escaping.
Solution: Do not require escaping in the expression.
2022-05-10 13:24:30 +01:00
Bram Moolenaar
6ed545e797
patch 8.2.4928: various white space and cosmetic mistakes
...
Problem: Various white space and cosmetic mistakes.
Solution: Change spaces to tabs, improve comments.
2022-05-09 20:09:23 +01:00
LemonBoy
2eaef106e4
patch 8.2.4883: string interpolation only works in heredoc
...
Problem: String interpolation only works in heredoc.
Solution: Support interpolated strings. Use syntax for heredoc consistent
with strings, similar to C#. (closes #10327 )
2022-05-06 13:14:50 +01:00
Ernie Rael
51d04d16f2
patch 8.2.4861: it is not easy to restore saved mappings
...
Problem: It is not easy to restore saved mappings.
Solution: Make mapset() accept a dict argument. (Ernie Rael, closes #10295 )
2022-05-04 15:40:22 +01:00
zeertzjq
db08887f24
patch 8.2.4858: K_SPECIAL may be escaped twice
...
Problem: K_SPECIAL may be escaped twice.
Solution: Avoid double escaping. (closes #10340 )
2022-05-02 22:53:45 +01:00
Bram Moolenaar
ec15b1cfdc
patch 8.2.4634: Vim9: cannot initialize a variable to null_list
...
Problem: Vim9: cannot initialize a variable to null_list.
Solution: Give negative count to NEWLIST. (closes #10027 )
Also fix inconsistencies in comparing with null values.
2022-03-27 16:29:53 +01:00
Bram Moolenaar
056678184f
patch 8.2.4576: Vim9: error for comparing with null can be annoying
...
Problem: Vim9: error for comparing with null can be annoying.
Solution: Allow comparing anything with null. (closes #9948 )
2022-03-15 20:21:33 +00:00
Bram Moolenaar
f8691004b0
patch 8.2.4534: Vim9: "is" operator with empty string and null returns true
...
Problem: Vim9: "is" operator with empty string and null returns true.
Solution: Consider empty string and null to be different for "is".
2022-03-10 12:20:53 +00:00
Bram Moolenaar
f3507a517c
patch 8.2.4530: making comparison with null work changes legacy behavior
...
Problem: Making comparison with null work changes legacy behavior.
Solution: Only use the better comparison in Vim9 script. (closes #9910 )
2022-03-09 11:56:21 +00:00
Bram Moolenaar
c6e9d7063d
patch 8.2.4489: failing test for comparing v:null with number
...
Problem: Failing test for comparing v:null with number.
Solution: Allow comparing v:null with number in legacy script.
(Ken Takata, closes #9873 ) Also do this for float.
2022-03-02 13:13:30 +00:00
Bram Moolenaar
f6b0c79742
patch 8.2.4488: build error with +eval but without +channel or +job
...
Problem: Build error with +eval but without +channel or +job.
Solution: Add #ifdef. (John Marriott)
2022-03-01 19:52:48 +00:00
Bram Moolenaar
7a22224875
patch 8.2.4487: Vim9: cannot compare with v:null
...
Problem: Vim9: cannot compare with v:null.
Solution: Allow comparing anything with v:null. (closes #9866 )
2022-03-01 19:23:24 +00:00
Bram Moolenaar
b2810f123c
patch 8.2.4046: some error messages not in the right place
...
Problem: Some error messages not in the right place.
Solution: Adjust the errors file. Fix typo.
2022-01-08 21:38:52 +00:00
Dominique Pelle
748b308eeb
patch 8.2.4038: various code not used when features are disabled
...
Problem: Various code not used when features are disabled.
Solution: Add #ifdefs. (Dominique Pellé, closes #9491 )
2022-01-08 12:41:16 +00:00
Bram Moolenaar
d82a47dd04
patch 8.2.4012: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move the last error messages to errors.h.
2022-01-05 20:24:39 +00:00
Bram Moolenaar
9d00e4a814
patch 8.2.4010: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
2022-01-05 17:49:15 +00:00
Bram Moolenaar
677658ae49
patch 8.2.4008: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
2022-01-05 16:09:06 +00:00
Bram Moolenaar
a6f7929e62
patch 8.2.4005: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
2022-01-04 21:30:47 +00:00
Bram Moolenaar
d88be5be80
patch 8.2.4003: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
2022-01-04 19:57:55 +00:00
Bram Moolenaar
ac78dd4a35
patch 8.2.3985: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
2022-01-02 19:25:26 +00:00
Bram Moolenaar
0699b040e6
patch 8.2.3971: build fails
...
Problem: Build fails.
Solution: Use the right error message name.
2022-01-01 16:01:23 +00:00
Bram Moolenaar
460ae5dfca
patch 8.2.3967: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more errors to errors.h.
2022-01-01 14:19:49 +00:00
Bram Moolenaar
8b6256f6ec
patch 8.2.3919: Vim9: wrong argument for append() results in two errors
...
Problem: Vim9: wrong argument for append() results in two errors.
Solution: Check did_emsg. Also for setline(). Adjust the help for
appendbufline().
2021-12-28 11:24:49 +00:00
Bram Moolenaar
223d0a6bc8
patch 8.2.3894: Vim9: no proper type check for first argument of call()
...
Problem: Vim9: no proper type check for first argument of call().
Solution: Add specific type check.
2021-12-25 19:29:21 +00:00
Bram Moolenaar
28fbbeac70
patch 8.2.3877: function does not abort after a type error in compare
...
Problem: Function does not abort after a type error in compare
Solution: Check getting number fails. (closes #9384 )
2021-12-22 21:40:33 +00:00