Bram Moolenaar
b7c21afef1
patch 8.2.2781: add() silently skips when adding to null list or blob
...
Problem: Add() silently skips when adding to null list or blob.
Solution: Give an error in Vim9 script. Allocate blob when it is NULL like
with list and dict.
2021-04-18 14:12:31 +02:00
Bram Moolenaar
f2253963c2
patch 8.2.2759: Vim9: for loop infers type of loop variable
...
Problem: Vim9: for loop infers type of loop variable.
Solution: Do not get the member type. (closes #8102 )
2021-04-13 20:53:13 +02:00
Bram Moolenaar
dcae51facc
patch 8.2.2738: extending a list with itself can give wrong result
...
Problem: Extending a list with itself can give wrong result.
Solution: Remember the item before where the insertion happens and skip to
after the already inserted items. (closes #1112 )
2021-04-08 20:10:10 +02:00
Bram Moolenaar
108cf0153c
patch 8.2.2621: typval2type() cannot handle recursive structures
...
Problem: typval2type() cannot handle recursive structures.
Solution: Use copyID. (closes #7979 )
2021-03-18 22:15:04 +01:00
Bram Moolenaar
027c4ab4d2
patch 8.2.2537: Vim9: crash when map() fails
...
Problem: Vim9: crash when map() fails.
Solution: Clear typval before using it. (closes #7884 )
2021-02-21 16:20:18 +01:00
Bram Moolenaar
5b5ae29bd3
patch 8.2.2533: Vim9: cannot use a range with :unlet
...
Problem: Vim9: cannot use a range with :unlet.
Solution: Implement ISN_UNLETRANGE.
2021-02-20 17:04:02 +01:00
Bram Moolenaar
f785aa1354
patch 8.2.2501: not always clear where an error is reported
...
Problem: Not always clear where an error is reported.
Solution: Add the where_T structure and pass it around. (closes #7796 )
2021-02-11 21:19:34 +01:00
Bram Moolenaar
ba98fb54ae
patch 8.2.2486: Vim9: some errors for white space do not show context
...
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
2021-02-07 18:06:29 +01:00
Bram Moolenaar
c3fc75db02
patch 8.2.2480: Vim9: some errors for white space do not show context
...
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
2021-02-07 15:28:09 +01:00
Bram Moolenaar
3b69006973
patch 8.2.2449: Vim9: flatten() always changes the list type
...
Problem: Vim9: flatten() always changes the list type.
Solution: Disallow using flatten() and add flattennew().
2021-02-01 20:14:51 +01:00
Bram Moolenaar
c03f5c677a
patch 8.2.2441: Vim9: extend() does not give an error for a type mismatch
...
Problem: Vim9: extend() does not give an error for a type mismatch.
Solution: Check the type of the second argument. (closes #7760 )
2021-01-31 17:48:30 +01:00
Bram Moolenaar
239f8d9326
patch 8.2.2367: test failures on some less often used systems
...
Problem: Test failures on some less often used systems.
Solution: Adjust printf formats and types. (James McCoy, closes #7691 )
2021-01-17 13:21:20 +01:00
Bram Moolenaar
70250fb4d2
patch 8.2.2365: Vim9: no check for map() changing item type at script level
...
Problem: Vim9: no check for map() changing item type at script level.
Solution: Check the new value type.
2021-01-16 19:01:53 +01:00
Bram Moolenaar
6601b62943
patch 8.2.2344: using inclusive index for slice is not always desired
...
Problem: Using inclusive index for slice is not always desired.
Solution: Add the slice() method, which has an exclusive index. (closes
#7408 )
2021-01-13 21:47:15 +01:00
Bram Moolenaar
b0e6b51364
patch 8.2.2336: Vim9: not possible to extend dictionary with different type
...
Problem: Vim9: it is not possible to extend a dictionary with different
item types.
Solution: Add extendnew(). (closes #7666 )
2021-01-12 20:23:40 +01:00
Bram Moolenaar
75ab91ff34
patch 8.2.2325: Vim9: crash if map() changes the item type
...
Problem: Vim9: crash if map() changes the item type.
Solution: Check that the item type is still OK. (closes #7652 )
Fix problem with mapnew() on range list.
2021-01-10 22:42:50 +01:00
Bram Moolenaar
e7525c5520
patch 8.2.2318: Vim9: string and list index work differently
...
Problem: Vim9: string and list index work differently.
Solution: Make string index work like list index. (closes #7643 )
2021-01-09 13:20:37 +01:00
Bram Moolenaar
aa210a3aec
patch 8.2.2272: Vim9: extend() can violate the type of a variable
...
Problem: Vim9: extend() can violate the type of a variable.
Solution: Add the type to the dictionary or list and check items against it.
(closes #7593 )
2021-01-02 15:41:03 +01:00
Bram Moolenaar
8e7d6223f6
patch 8.2.2160: various typos
...
Problem: Various typos.
Solution: Fix spelling mistakes. (closes #7494 )
2020-12-18 19:49:56 +01:00
Bram Moolenaar
57cf4973a2
patch 8.2.2075: error for const argument to mapnew()
...
Problem: Error for const argument to mapnew().
Solution: Don't give an error. (closes #7400 )
2020-12-01 21:08:05 +01:00
Bram Moolenaar
f8ca03bf91
patch 8.2.2065: using map() and filter() on a range() is inefficient
...
Problem: Using map() and filter() on a range() is inefficient.
Solution: Do not materialize the range. (closes #7388 )
2020-11-28 20:32:29 +01:00
Bram Moolenaar
9681f71392
patch 8.2.2027: Coverity warnts for uninitialized field
...
Problem: Coverity warnts for uninitialized field.
Solution: Set "v_lock".
2020-11-21 13:58:50 +01:00
Bram Moolenaar
659bb2275e
patch 8.2.1980: Vim9: some tests are not done at the script level
...
Problem: Vim9: some tests are not done at the script level.
Solution: Use CheckDefAndScriptSuccess() in more places. Fix uncovered
problems.
2020-11-12 20:16:39 +01:00
Bram Moolenaar
c56936e2ba
patch 8.2.1971: memory leak when map() fails
...
Problem: Memory leak when map() fails.
Solution: Clear the typval.
2020-11-10 11:43:56 +01:00
Bram Moolenaar
ea696852e7
patch 8.2.1969: Vim9: map() may change the list or dict item type
...
Problem: Vim9: map() may change the list or dict item type.
Solution: Add mapnew().
2020-11-09 18:31:39 +01:00
Bram Moolenaar
348be7ed07
patch 8.2.1949: Vim9: using extend() on null dict is silently ignored
...
Problem: Vim9: using extend() on null dict is silently ignored.
Solution: Give an error message. Initialize a dict variable with an empty
dictionary. (closes #7251 )
2020-11-04 11:36:35 +01:00
Bram Moolenaar
0d90e728fe
patch 8.2.1945: crash when passing NULL function to reduce()
...
Problem: Crash when passing NULL function to reduce().
Solution: Check for NULL pointer and give an error. (Dominique Pellé,
closes #7243 )
2020-11-03 18:20:19 +01:00
Bram Moolenaar
55e29611d2
patch 8.2.1933: cannot sort using locale ordering
...
Problem: Cannot sort using locale ordering.
Solution: Add a flag for :sort and sort() to use the locale. (Dominique
Pellé, closes #7237 )
2020-11-01 13:57:44 +01:00
Bram Moolenaar
ffdf8adfa8
patch 8.2.1852: map() returing zero for NULL list is unexpected
...
Problem: map() returing zero for NULL list is unexpected.
Solution: Return the empty list. (closes #7133 )
2020-10-15 22:29:17 +02:00
Bram Moolenaar
1a73923705
patch 8.2.1821: Vim9: concatenating to a NULL list doesn't work
...
Problem: Vim9: concatenating to a NULL list doesn't work.
Solution: Handle a NULL list like an empty list. (closes #7064 )
2020-10-10 15:37:58 +02:00
Bram Moolenaar
08e51f446b
patch 8.2.1701: Vim9: sort("i") does not work
...
Problem: Vim9: sort("i") does not work.
Solution: Don't try getting a number for a string argument. (closes #6958 )
2020-09-16 23:23:36 +02:00
Bram Moolenaar
a187c43cfe
patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
...
Problem: Cannot lock a variable in legacy Vim script like in Vim9.
Solution: Make ":lockvar 0" work.
2020-09-16 21:08:28 +02:00
Bram Moolenaar
a48f786787
patch 8.2.1610: Vim9: cannot pass "true" to list2str() and str2list()
...
Problem: Vim9: cannot pass "true" to list2str() and str2list().
Solution: Use tv_get_bool_chk(). (closes #6877 )
2020-09-05 20:16:57 +02:00
Bram Moolenaar
119f557230
patch 8.2.1571: Vim9: count() third argument cannot be "true"
...
Problem: Vim9: count() third argument cannot be "true".
Solution: use tv_get_bool_chk(). (closes #6818 )
2020-09-02 21:31:22 +02:00
Bram Moolenaar
7cb6fc29d0
patch 8.2.1504: Vim9: white space checks are only done for a :def function
...
Problem: Vim9: white space checks are only done for a :def function.
Solution: Also do checks at the script level. Adjust the name of a few
error messages.
2020-08-21 22:36:47 +02:00
Bram Moolenaar
cc673e746a
patch 8.2.1466: Vim9: cannot index or slice a variable with type "any"
...
Problem: Vim9: cannot index or slice a variable with type "any".
Solution: Add runtime index and slice.
2020-08-16 17:33:35 +02:00
Bram Moolenaar
56acb0943e
patch 8.2.1465: Vim9: subscript not handled properly
...
Problem: Vim9: subscript not handled properly.
Solution: Adjust error message. Remove dead code. Disallow string to
number conversion in scripts.
2020-08-16 14:48:19 +02:00
Bram Moolenaar
ed5918771f
patch 8.2.1463: Vim9: list slice not supported yet
...
Problem: Vim9: list slice not supported yet.
Solution: Add support for list slicing.
2020-08-15 22:14:53 +02:00
Bram Moolenaar
bc4c505166
patch 8.2.1444: error messages are spread out and names can be confusing
...
Problem: Error messages are spread out and names can be confusing.
Solution: Start moving error messages to a separate file and use clear
names.
2020-08-13 22:47:35 +02:00
Bram Moolenaar
db199216e8
patch 8.2.1430: Vim9: error for missing comma instead of extra white space
...
Problem: Vim9: error for missing comma instead of extra white space.
Solution: Check if comma can be found after white space. (closes #6668 )
Also check for extra white space in literal dict. (closes #6670 )
2020-08-12 18:01:53 +02:00
Bram Moolenaar
4d4d1cd5c8
patch 8.2.1328: no space allowed before comma in list
...
Problem: No space allowed before comma in list.
Solution: Legacy Vim script allows it. (closes #6577 )
2020-07-30 22:14:33 +02:00
Bram Moolenaar
9d48956681
patch 8.2.1326: Vim9: skipping over white space after list
...
Problem: Vim9: skipping over white space after list.
Solution: Do not skip white space, a following [] would be misinterpreted.
(closes #6552 ) Fix a few side effects.
2020-07-30 20:08:50 +02:00
Bram Moolenaar
eb6880b6eb
patch 8.2.1190: Vim9: checking for Vim9 syntax is spread out
...
Problem: Vim9: checking for Vim9 syntax is spread out.
Solution: Use in_vim9script().
2020-07-12 17:07:05 +02:00
Bram Moolenaar
962d721319
patch 8.2.1125: Vim9: double quote can be a string or a comment
...
Problem: Vim9: double quote can be a string or a comment.
Solution: Only support comments starting with # to avoid confusion.
2020-07-04 14:15:00 +02:00
Bram Moolenaar
9a78e6df17
patch 8.2.1111: inconsistent naming of get_list_tv() and eval_dict()
...
Problem: Inconsistent naming of get_list_tv() and eval_dict().
Solution: Rename get_list_tv() to eval_list(). Similarly for eval_number(),
eval_string(), eval_lit_string() and a few others.
2020-07-01 18:29:55 +02:00
Bram Moolenaar
e6b5324e3a
patch 8.2.1110: Vim9: line continuation does not work in function arguments
...
Problem: Vim9: line continuation does not work in function arguments.
Solution: Pass "evalarg" to get_func_tv(). Fix seeing double quoted string
as comment.
2020-07-01 17:28:33 +02:00
Bram Moolenaar
fda20c4cc5
patch 8.2.1083: crash when using reduce() on a NULL list
...
Problem: Crash when using reduce() on a NULL list.
Solution: Only access the list when not NULL.
2020-06-29 20:09:36 +02:00
Bram Moolenaar
9215f01218
patch 8.2.1074: Vim9: no line break allowed after some operators
...
Problem: Vim9: no line break allowed after some operators.
Solution: Skip a line break after the operator. Add
eval_may_get_next_line() to simplify checking for a line break.
2020-06-27 21:18:00 +02:00
Bram Moolenaar
e6e031739c
patch 8.2.1069: Vim9: fail to check for white space in list
...
Problem: Vim9: fail to check for white space in list.
Solution: Add check for white space.
2020-06-27 16:36:05 +02:00
Bram Moolenaar
7147820cb9
patch 8.2.1065: Vim9: no line break allowed inside a list
...
Problem: Vim9: no line break allowed inside a list.
Solution: Handle line break inside a list in Vim9 script.
2020-06-26 22:46:27 +02:00