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
Bram Moolenaar
d877a5700f
patch 8.2.2687: Vim9: cannot use "const" for global variable in :def function
...
Problem: Vim9: cannot use "const" for global variable in :def function.
Solution: Do allow using :const for a global variable. (closes #8030 )
2021-04-01 19:42:48 +02:00
Bram Moolenaar
3215466af9
patch 8.2.2673: Vim9: script-local funcref can have lower case name
...
Problem: Vim9: script-local funcref can have lower case name.
Solution: Require an upper case name.
2021-03-28 21:14:06 +02:00
Bram Moolenaar
ccc25aa285
patch 8.2.2660: Vim9: no error for declaration with trailing text
...
Problem: Vim9: no error for declaration with trailing text.
Solution: Give an error. (closes #8014 )
2021-03-26 21:27:52 +01:00
Bram Moolenaar
3f32788000
patch 8.2.2618: Vim9: cannot use a normal list name to store function refs
...
Problem: Vim9: cannot use a normal list name to store function refs.
Solution: Allow a lower case name if it is indexed.
2021-03-17 20:56:38 +01:00
Bram Moolenaar
f76ec1eeb5
patch 8.2.2565: Vim9: "..=" not always recognized
...
Problem: Vim9: "..=" not always recognized.
Solution: Do not consider "..=" to be string concatenation. (closes #7905 )
2021-03-03 17:58:16 +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
c7dac8534e
patch 8.2.2528: Vim9: crash when compiling lambda fails
...
Problem: Vim9: crash when compiling lambda fails.
Solution: Bail out after compilation fails. (closes #7862 )
2021-02-17 18:49:11 +01:00
Bram Moolenaar
064095012c
patch 8.2.2527: Vim9: lambda return type is not determined at script level
...
Problem: Vim9: lambda return type is not determined at script level.
Solution: Compile the lambda to get the return type. (closes #7843 )
2021-02-17 17:00:27 +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
9a562c184d
patch 8.2.2395: Vim9: error for wrong type may report wrong line number
...
Problem: Vim9: error for wrong type may report wrong line number.
Solution: Save and restore the line number when evaluating the expression.
(closes #7727 )
2021-01-23 13:39:14 +01:00
Bram Moolenaar
c5f59fab23
patch 8.2.2381: Vim9: divide by zero does not abort expression execution
...
Problem: Vim9: divide by zero does not abort expression execution.
Solution: Use a "failed" flag. (issue #7704 )
2021-01-21 12:34:14 +01:00
Bram Moolenaar
f30a14db3b
patch 8.2.2373: Vim9: list assignment only accepts a number index
...
Problem: Vim9: list assignment only accepts a number index.
Solution: Accept "any" and do a runtime type check. (closes #7694 )
2021-01-17 21:51:24 +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
082517570d
patch 8.2.2331: Vim9: wrong error when modifying dict declared with :final
...
Problem: Vim9: wrong error when modifying dict declared with :final.
Solution: Do not check for writable variable when an index follows.
(closes #7657 )
2021-01-11 21:20:18 +01:00
Bram Moolenaar
9e0f883f89
patch 8.2.2317: Vim9: command modifier before list unpack doesn't work
...
Problem: Vim9: command modifier before list unpack doesn't work.
Solution: Only recognize "[" directly after the name. (closes #7641 )
2021-01-09 12:09:22 +01:00
Bram Moolenaar
17126b1396
patch 8.2.2311: Vim9: cannot assign to variable that shadows command modifier
...
Problem: Vim9: cannot assign to a variable that shadows a command modifier.
Solution: Check for assignment after possible command modifier.
(closes #7632 )
2021-01-07 22:03:02 +01:00
Bram Moolenaar
328eac2b5d
patch 8.2.2308: Vim9: no error when assigning lambda to funcref
...
Problem: Vim9: no error when assigning lambda to funcref without return
value.
Solution: Default return value to "any". (closes #7629 )
2021-01-07 19:23:08 +01:00
Bram Moolenaar
0acbf5ae66
patch 8.2.2304: Vim9: no test for unletting an imported variable
...
Problem: Vim9: no test for unletting an imported variable.
Solution: Add a test. Fix line number in error.
2021-01-05 20:58:25 +01:00
Bram Moolenaar
752fc692ac
patch 8.2.2301: Vim9: cannot unlet a dict or list item
...
Problem: Vim9: cannot unlet a dict or list item.
Solution: Add ISN_UNLETINDEX. Refactor assignment code to use for unlet.
2021-01-04 21:57:11 +01:00
Bram Moolenaar
0ea0440865
patch 8.2.2297: Vim9: cannot set 'number' to a boolean value
...
Problem: Vim9: cannot set 'number' to a boolean value.
Solution: Use tv_get_bool(). (closes #7615 )
2021-01-04 13:37:54 +01:00