Bram Moolenaar
13789bf103
patch 8.2.3945: Vim9: partial variable argument types are wrong
...
Problem: Vim9: partial variable argument types are wrong, leading to a
crash.
Solution: When adjusting the argument count also adjust the argument types.
(closes #9433 )
2021-12-30 13:29:00 +00:00
Bram Moolenaar
86b3ab4fa0
patch 8.2.3854: Vim9: inconsistent arguments for test functions
...
Problem: Vim9: inconsistent arguments for test functions.
Solution: When :def function and script have different arguments use a list
with two items instead of a separate function.
2021-12-19 18:33:23 +00:00
Bram Moolenaar
44a8977de4
patch 8.2.3844: Vim9: no type error if assigning func(number) to func(string)
...
Problem: Vim9: no type error if assigning a value with type func(number) to
a variable of type func(string).
Solution: Use check_type_maybe(): return MAYBE if a runtime type check is
useful. (issue #8492 )
2021-12-18 12:31:33 +00:00
Bram Moolenaar
71b7685092
patch 8.2.3841: Vim9: outdated TODO items, disabled tests that work
...
Problem: Vim9: outdated TODO items, disabled tests that work.
Solution: Remove TODO items, run tests that work now. Check that a dict
item isn't locked.
2021-12-17 20:15:38 +00:00
Bram Moolenaar
db9ff9ab5d
patch 8.2.3717: Vim9: error for constant list size is only given at runtime
...
Problem: Vim9: error for constant list size is only given at runtime.
Solution: Give the error at compile time if possible.
2021-12-01 17:38:01 +00:00
Bram Moolenaar
ab36e6ae7b
patch 8.2.3704: Vim9: cannot use a list declaration in a :def function
...
Problem: Vim9: cannot use a list declaration in a :def function.
Solution: Make it work.
2021-11-30 16:14:49 +00:00
Bram Moolenaar
7f2c341664
patch 8.2.3696: Vim9: error for invalid assignment when skipping
...
Problem: Vim9: error for invalid assignment when skipping.
Solution: Do not check white space when skipping. (closes #9243 )
2021-11-29 16:01:49 +00:00
Bram Moolenaar
7824fc80f6
patch 8.2.3682: Vim9: assigning to a script variable drops the type
...
Problem: Vim9: assigning to a script variable drops the required type.
Solution: Lookup the type of the variable and use it. (closes #9219 )
2021-11-26 17:36:51 +00:00
Bram Moolenaar
07802044b9
patch 8.2.3423: Vim9: list += list creates a new list in :def function
...
Problem: Vim9: list += list creates a new list in :def function.
Solution: Append to the existing list.
2021-09-09 23:01:14 +02:00
Bram Moolenaar
60faf8656e
patch 8.2.3370: Vim9: no check for white space before type in declaration
...
Problem: Vim9: no check for white space before type in declaration.
(Naohiro Ono)
Solution: Check for white space like in a compiled function. (closes #8785 )
2021-08-23 22:22:45 +02:00
Bram Moolenaar
4f0884d6e2
patch 8.2.3332: Vim9: cannot assign to range in list
...
Problem: Vim9: cannot assign to range in list.
Solution: Implement overwriting a list range.
2021-08-11 21:49:23 +02:00
Bram Moolenaar
4270d8b762
patch 8.2.3310: Vim9: unpack assignment does not mention source of type error
...
Problem: Vim9: unpack assignment does not mention source of type error.
Solution: Mention the argument number. (closes #8719 )
2021-08-07 16:30:42 +02:00
Bram Moolenaar
af647e76ca
patch 8.2.3296: Vim9: cannot add a number to a float
...
Problem: Vim9: cannot add a number to a float.
Solution: Accept a number if the destination is a float. (closes #8703 )
2021-08-05 19:01:17 +02:00
Bram Moolenaar
23e2e11515
patch 8.2.3281: Vim9: TODO items in tests can be taken care of
...
Problem: Vim9: TODO items in tests can be taken care of.
Solution: Update test for now working functionality. (closes #8694 )
2021-08-03 21:16:18 +02:00
Bram Moolenaar
7bf9a07bd7
patch 8.2.3278: Vim9: error when adding 1 to float
...
Problem: Vim9: error when adding 1 to float.
Solution: Accept t_number_bool. (closes #8687 )
2021-08-02 21:55:15 +02:00
Bram Moolenaar
e97976baa7
patch 8.2.3266: Vim9: assignment with two indexes may check next line
...
Problem: Vim9: assignment with two indexes may check next line.
Solution: Limit the number of lines to avoid checking the next line when
assiging to a LHS subscript. (closes #8660 )
2021-08-01 13:17:17 +02:00
Bram Moolenaar
f5d52c90e0
patch 8.2.3263: Vim9: "..=" does not accept same types as the ".." operator
...
Problem: Vim9: "..=" does not accept same types as the ".." operator.
Solution: Convert value to string like ".." does. (issue #8664 )
2021-07-31 22:51:10 +02:00
Bram Moolenaar
81530e3603
patch 8.2.3239: Vim9: no error using heredoc for a number variable
...
Problem: Vim9: no error using heredoc for a number variable.
Solution: Add a type check. (closes #8627 )
2021-07-28 21:25:49 +02:00
Bram Moolenaar
327d3ee455
patch 8.2.3237: when a builtin function gives an error processing continues
...
Problem: When a builtin function gives an error processing continues.
Solution: In Vim9 script return FAIL in get_func_tv().
2021-07-28 19:34:14 +02:00
Bram Moolenaar
47bc9c3337
patch 8.2.3174: Vim9: "legacy undo" finds "undo" variable
...
Problem: Vim9: "legacy undo" finds "undo" variable.
Solution: Do not pass lookup function to find_ex_command(). (closes #8563 )
2021-07-17 21:24:56 +02:00
Bram Moolenaar
378697ac58
patch 8.2.3168: Vim9: type error for constant of type any
...
Problem: Vim9: type error for constant of type any.
Solution: Do add a runtime type check if a constant has type any.
(closes #8570 )
2021-07-15 19:23:18 +02:00
Bram Moolenaar
22f85d0459
patch 8.2.3107: Vim9: error for arguments while type didn't specify arguments
...
Problem: Vim9: error for arguments while type didn't specify arguments.
Solution: Do not update that type to check when no argument count is
specified. (closes #8492 )
2021-07-04 23:29:30 +02:00
Bram Moolenaar
6977dba04b
patch 8.2.3106: Vim9: confusing line number reported for error
...
Problem: Vim9: confusing line number reported for error.
Solution: Use the start line number for the store instruction.
(closes #8488 )
2021-07-04 22:48:12 +02:00
Bram Moolenaar
97f227d9c9
patch 8.2.3105: Vim9: type of partial is wrong when it has arguments
...
Problem: Vim9: type of partial is wrong when it has arguments.
Solution: Subtract arguments from the count. (issue #8492 )
2021-07-04 20:20:52 +02:00
Bram Moolenaar
b7480cd893
patch 8.2.3104: Vim9: unspecified function type causes type error
...
Problem: Vim9: unspecified function type causes type error.
Solution: Don't check type when min_argcount is negative. (issue #8492 )
2021-07-04 18:28:15 +02:00
Bram Moolenaar
7a40ff00ed
patch 8.2.3100: Vim9: no error when using type with unknown number of args
...
Problem: Vim9: no error when using type with unknown number of arguments.
Solution: Do not ignore argument count of -1. (closes #8492 )
2021-07-04 15:54:08 +02:00
Bram Moolenaar
e65081d1b5
patch 8.2.3064: Vim9: in script cannot set item in uninitialized list
...
Problem: Vim9: in script cannot set item in uninitialized list.
Solution: When a list is NULL allocate an empty one. (closes #8461 )
2021-06-27 15:04:05 +02:00
Bram Moolenaar
3a3b10e87a
patch 8.2.3055: strange error for assigning to "x.key" on non-dictionary
...
Problem: Strange error for assigning to "x.key" on non-dictionary.
Solution: Add a specific error message. (closes #8451 )
2021-06-26 15:00:59 +02:00
Bram Moolenaar
4d5dfe2083
patch 8.2.3054: Vim9: unpack assignment using "_" after semicolon fails
...
Problem: Vim9: unpack assignment using "_" after semicolon fails.
Solution: Drop the expression result. (closes #8453 )
2021-06-26 13:59:29 +02:00
Bram Moolenaar
13e45d14ba
patch 8.2.3053: Vim9: cannot assign to @@ in :def function
...
Problem: Vim9: cannot assign to @@ in :def function
Solution: Handle '@' like '"'.
2021-06-26 13:28:35 +02:00
Bram Moolenaar
22480d147f
patch 8.2.3048: strange error for white space after ++ command
...
Problem: Strange error for white space after ++ command.
Solution: Check for white space explicitly. (closes #8440 )
2021-06-25 21:31:09 +02:00
Bram Moolenaar
f3d30842dc
patch 8.2.3047: increment and decrement don't allow for next command
...
Problem: Increment and decrement don't allow for next command.
Solution: Allow for comment and next command. (closes #8442 )
2021-06-25 19:29:30 +02:00
Bram Moolenaar
035bd1c99f
patch 8.2.3029: Vim9: crash when using operator and list unpack assignment
...
Problem: Vim9: crash when using operator and list unpack assignment.
(Naohiro Ono)
Solution: Get variable value before operation. (closes #8416 )
2021-06-21 19:44:11 +02:00
Bram Moolenaar
74f4a965bc
patch 8.2.3015: Vim9: Assigning to @# requires a string
...
Problem: Vim9: Assigning to @# requires a string. (Naohiro Ono)
Solution: Accent a number or a string. (closes #8396 )
2021-06-17 21:03:07 +02:00
Bram Moolenaar
7423577180
patch 8.2.2982: Vim9: future commands are not reserved yet
...
Problem: Vim9: future commands are not reserved yet.
Solution: Add commands to be implemented later. Make "this" a reserved
name.
2021-06-12 14:53:05 +02:00
Bram Moolenaar
d0edaf9dc2
patch 8.2.2897: Vim9: can use reserved words at the script level
...
Problem: Vim9: can use reserved words at the script level.
Solution: Check variable names for reserved words. (closes #8253 )
2021-05-28 21:06:08 +02:00
Bram Moolenaar
227c58a486
patch 8.2.2817: Vim9: script sourcing continues after an error
...
Problem: Vim9: script sourcing continues after an error.
Solution: Make an error in any command in "vim9script" abort sourcing.
2021-04-28 20:40:44 +02:00
Bram Moolenaar
730bf30020
patch 8.2.2808: Vim9: increment and decrement not sufficiently tested
...
Problem: Vim9: increment and decrement not sufficiently tested.
Solution: Add assertions.
2021-04-24 20:43:56 +02:00
Bram Moolenaar
bdc0f1c698
patch 8.2.2806: Vim9: using "++nr" as a command might not work
...
Problem: Vim9: using "++nr" as a command might not work.
Solution: Do not recognize "++" and "--" in a following line as addition or
subtraction.
2021-04-24 19:08:24 +02:00
Bram Moolenaar
96cf4ba8fb
patch 8.2.2805: Vim9: cannot use legacy syntax in Vim9 script
...
Problem: Vim9: cannot use legacy syntax in Vim9 script.
Solution: Add the :legacy command.
2021-04-24 14:15:41 +02:00
Bram Moolenaar
aa1959bd5e
patch 8.2.2771: Vim9: assignment not recognized if declaration was skipped
...
Problem: Vim9: assignment not recognized if declaration was skipped.
Solution: Also recognized an assignment if the variable does not exist.
(closes #8108 )
2021-04-15 22:13:39 +02:00
Bram Moolenaar
f93bbd0262
patch 8.2.2753: Vim9: cannot ignore an item in assignment unpack
...
Problem: Vim9: cannot ignore an item in assignment unpack.
Solution: Allow using an underscore.
2021-04-10 22:35:43 +02:00
Bram Moolenaar
643ce6c0c6
patch 8.2.2729: Vim9: wrong error message for referring to legacy script var
...
Problem: Vim9: wrong error message for referring to legacy script variable.
Solution: Do allow referring to a variable in legacy script without "s:" if
it exists at compile time. (closes #8076 )
2021-04-06 21:17:27 +02:00
Bram Moolenaar
0d351a04e1
patch 8.2.2724: Vim9: concatenating to list in dict not tested
...
Problem: Vim9: concatenating to list in dict not tested.
Solution: Add a test. (issue #8068 )
2021-04-05 21:05:26 +02:00
Bram Moolenaar
b9c0cd897a
patch 8.2.2722: Vim9: crash when using LHS with double index
...
Problem: Vim9: crash when using LHS with double index.
Solution: Handle lhs_dest which is "dest_expr". (closes #8068 )
Fix confusing error message for missing dict item.
2021-04-05 20:51:00 +02:00
Bram Moolenaar
e42939af87
patch 8.2.2719: Vim9: appending to dict item doesn't work in a :def function
...
Problem: Vim9: appending to dict item doesn't work in a :def function.
Solution: Implement assignment with operator on indexed item.
2021-04-05 17:11:17 +02:00
Bram Moolenaar
77709b194c
patch 8.2.2705: Vim9: misleading reported line number for wrong type
...
Problem: Vim9: misleading reported line number for wrong type.
Solution: Remember and use the line number at the start. (closes #8059 )
2021-04-03 21:01:01 +02:00
Bram Moolenaar
6e50ec2f0a
patch 8.2.2703: Vim9: memory leak when failing on locked variable
...
Problem: Vim9: memory leak when failing on locked variable.
Solution: Free the memory.
2021-04-03 19:32:44 +02:00
Bram Moolenaar
dcf29ac87f
patch 8.2.2693: Vim9: locked script variable can be changed
...
Problem: Vim9: locked script variable can be changed.
Solution: Check legacy script variable for being locked. (issue #8031 )
2021-04-02 14:44:02 +02:00
Bram Moolenaar
f5906aa780
patch 8.2.2692: Vim9: locked script variable can be changed
...
Problem: Vim9: locked script variable can be changed.
Solution: Check for locked value. (closes #8031 )
2021-04-02 14:35:15 +02:00