Bram Moolenaar
b141926890
patch 8.2.2766: test failure
...
Problem: Test failure.
Solution: Add change to Vim9 compilation error message.
2021-04-14 20:54:07 +02:00
Bram Moolenaar
f62d73933a
patch 8.2.2762: Vim9: function line truncated when compiling
...
Problem: Vim9: function line truncated when compiling.
Solution: Copy the line before processing it. (closes #8101 )
2021-04-14 12:40:00 +02:00
Bram Moolenaar
f6a8d420a8
patch 8.2.2760: Vim9: no error for changing a for loop variable
...
Problem: Vim9: no error for changing a for loop variable.
Solution: Make the loop variable read-only. (issue #8102 )
2021-04-13 21:48:03 +02:00
Bram Moolenaar
68452177ca
patch 8.2.2757: Vim9: blob tests for legacy and Vim9 script are separate
...
Problem: Vim9: blob tests for legacy and Vim9 script are separate.
Solution: Add CheckLegacyAndVim9Success(). Make blob index assign work.
2021-04-12 21:21:02 +02:00
Bram Moolenaar
cfc3023cb6
patch 8.2.2756: Vim9: blob index and slice not implemented yet
...
Problem: Vim9: blob index and slice not implemented yet.
Solution: Implement blob index and slice.
2021-04-11 20:26:34 +02:00
Bram Moolenaar
af8ea0d066
patch 8.2.2755: Vim9: no error for using a number in a condition
...
Problem: Vim9: no error for using a number in a condition.
Solution: Also use ISN_COND2BOOL if the type is t_number_bool.
(closes #7644 )
2021-04-11 18:24:46 +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
da479c7597
patch 8.2.2750: Vim9: error for using underscore in nested function
...
Problem: Vim9: error for using underscore in nested function.
Solution: Do not consider "_" already defined. (closes #8096 )
2021-04-10 21:01:38 +02:00
Bram Moolenaar
962c43bf0d
patch 8.2.2744: Vim9: no way to explicitly ignore an argument
...
Problem: Vim9: no way to explicitly ignore an argument.
Solution: Use the underscore as the name for an ignored argument.
2021-04-10 17:18:09 +02:00
Bram Moolenaar
599410cb3c
patch 8.2.2743: Vim9: function state stuck when compiling with ":silent!"
...
Problem: Vim9: function state stuck when compiling with ":silent!".
Solution: Check for uf_def_status to be UF_COMPILING.
2021-04-10 14:03:43 +02:00
Bram Moolenaar
701cc6ca9e
patch 8.2.2742: Vim9: when compiling a function fails it is cleared
...
Problem: Vim9: when compiling a function fails it is cleared.
Solution: Keep the function lines, prevent execution with a different
status. (closes #8093 )
2021-04-10 13:33:48 +02:00
Bram Moolenaar
1088b69451
patch 8.2.2741: Vim9: Partial call does not check right arguments
...
Problem: Vim9: Partial call does not check right arguments.
Solution: Adjust the offset for whether the partial is before or after the
arguments. (closes #8091 )
2021-04-09 22:12:44 +02:00
Bram Moolenaar
2a38908b05
patch 8.2.2740: Vim9: lambda with varargs doesn't work
...
Problem: Vim9: lambda with varargs doesn't work.
Solution: Make "...name" work. Require type to be a list.
2021-04-09 20:24:31 +02:00
Bram Moolenaar
fa5963880d
patch 8.2.2735: Vim9: function reference found with prefix, not without
...
Problem: Vim9: function reference found with prefix, not without.
Solution: Also find function reference without prefix.
2021-04-07 21:58:16 +02:00
Bram Moolenaar
15e5e53ef2
patch 8.2.2734: Vim9: cannot use legacy script-local var from :def function
...
Problem: Vim9: cannot use legacy script-local var from :def function.
Solution: Do not insist on using "s:" prefix. (closes #8076 )
2021-04-07 21:21:13 +02:00
Bram Moolenaar
c9605f0595
patch 8.2.2730: Coverity complains about not restoring character
...
Problem: Coverity complains about not restoring character.
Solution: Also restore the character in case of an error.
2021-04-06 21:29:32 +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
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
2927c07b0e
patch 8.2.2721: Vim9: cannot have a linebreak inside a lambda
...
Problem: Vim9: cannot have a linebreak inside a lambda.
Solution: Compile the expression before the arguments.
2021-04-05 19:41:21 +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
90193e6140
patch 8.2.2710: Vim9: not all tests cover script and :def function
...
Problem: Vim9: not all tests cover script and :def function.
Solution: Run tests in both if possible. Fix differences.
2021-04-04 20:49:50 +02:00
Bram Moolenaar
a7511c0f4f
patch 8.2.2706: Vim9: wrong line number reported for boolean operator
...
Problem: Vim9: wrong line number reported for boolean operator.
Solution: Use the line number before skipping over line break.
(closes #8058 )
2021-04-03 21:47:07 +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
ca51cc0a33
patch 8.2.2688: Vim9: crash when using s: for script variable
...
Problem: Vim9: crash when using s: for script variable.
Solution: Pass the end pointer. (closes #8045 )
2021-04-01 21:38:53 +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
529fb5a5f6
patch 8.2.2682: Vim9: cannot find Name.Func from "import * as Name"
...
Problem: Vim9: cannot find Name.Func from "import * as Name". (Alexander
Goussas)
Solution: When no variable found try finding a function. (closes #8045 )
Check that the function was exported.
2021-04-01 12:57:57 +02:00
Bram Moolenaar
38a3bfa9a2
patch 8.2.2677: Vim9: cannot use only some of the default arguments
...
Problem: Vim9: cannot use only some of the default arguments.
Solution: Use v:none to use default argument value. Remove
uf_def_arg_idx[], use JUMP_IF_ARG_SET. (closes #6504 )
2021-03-29 22:14:55 +02:00
Bram Moolenaar
b2cb6c8bbd
patch 8.2.2672: Vim9: cannot use :lockvar and :unlockvar in compiled script
...
Problem: Vim9: cannot use :lockvar and :unlockvar in compiled script.
Solution: Implement locking support.
2021-03-28 20:38:34 +02:00
Bram Moolenaar
74e54fcb44
patch 8.2.2658: :for cannot loop over a string
...
Problem: :for cannot loop over a string.
Solution: Accept a string argument and iterate over its characters.
2021-03-26 20:41:29 +01:00
Bram Moolenaar
fa984418e7
patch 8.2.2652: Vim9: can use command modifier without an effect
...
Problem: Vim9: can use command modifier without an effect.
Solution: Give an error for a misplaced command modifier. Fix error message
number.
2021-03-25 22:15:28 +01:00
Bram Moolenaar
a91a71322d
patch 8.2.2651: Vim9: restoring command modifiers happens after jump
...
Problem: Vim9: restoring command modifiers happens after jump.
Solution: Move the restore instruction to before the jump. (closes #8006 )
Also handle for and while.
2021-03-25 21:12:15 +01:00
Bram Moolenaar
67da21a147
patch 8.2.2636: memory leak when compiling inline function
...
Problem: Memory leak when compiling inline function.
Solution: Free the prefetched line.
2021-03-21 22:12:34 +01:00
Bram Moolenaar
7a6eaa06f9
patch 8.2.2635: Vim9: cannot define an inline function
...
Problem: Vim9: cannot define an inline function.
Solution: Make an inline function mostly work.
2021-03-21 20:53:29 +01:00
Bram Moolenaar
4b3e1964d8
patch 8.2.2620: Vim9: Using #{ for a dictionary gives strange errors
...
Problem: Vim9: Using #{ for a dictionary gives strange errors.
Solution: Give an error when using #{ for a comment after a command.
2021-03-18 21:37:55 +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
8863bda25d
patch 8.2.2617: Vim9: script variable in block not found by function
...
Problem: Vim9: script variable in a block scope not found by a nested
function.
Solution: Copy the block scope IDs before compiling the function.
2021-03-17 18:42:08 +01:00
Bram Moolenaar
77b10ffad4
patch 8.2.2603: Vim9: no effect if user command is also a function
...
Problem: Vim9: no effect if user command is also a function.
Solution: Check for paren following. (closes #7960 )
2021-03-14 13:21:35 +01:00
Bram Moolenaar
edba70703b
patch 8.2.2599: build failure
...
Problem: Build failure.
Solution: Add missing change.
2021-03-13 21:14:18 +01:00
Bram Moolenaar
12bce95887
patch 8.2.2590: Vim9: default argument value may cause internal error
...
Problem: Vim9: default argument value may cause internal error.
Solution: Hide later function arguments when compiling the expression.
(closes #7948 )
2021-03-11 20:04:04 +01:00
Bram Moolenaar
c23555de34
patch 8.2.2585: Vim9: illegal memory access
...
Problem: Vim9: illegal memory access.
Solution: Check byte right after "null", not one more.
2021-03-10 19:04:07 +01:00
Bram Moolenaar
d345fb9216
patch 8.2.2584: Vim9: type error for assigning "any" to a list
...
Problem: Vim9: type error for assigning the result of list concatenation to
a list.
Solution: Do not consider concatenation result in a constant. (closes #7942 )
2021-03-10 18:43:09 +01:00
Bram Moolenaar
6914e87d3c
patch 8.2.2575: Vim9: a function name with "->" in the next line doesn't work
...
Problem: Vim9: a function name with "->" in the next line doesn't work.
Solution: Recognize a function name by itself. (closes #7770 )
2021-03-06 21:01:09 +01:00
Bram Moolenaar
18062fcad6
patch 8.2.2572: Vim9: crash when getting the types for a legacy function
...
Problem: Vim9: crash when getting the types for a legacy function.
Solution: Initialize the type list growarray. (closes #7929 )
2021-03-05 21:35:47 +01:00
Bram Moolenaar
057e84afe5
patch 8.2.2558: no error if a lambda argument shadows a variable
...
Problem: No error if a lambda argument shadows a variable.
Solution: Check that the argument name shadows a local, argument or script
variable. (closes #7898 )
2021-02-28 16:55:11 +01:00
Bram Moolenaar
b4893b8450
patch 8.2.2540: Vim9: no error for using script var name for argument
...
Problem: Vim9: no error for using script var name for argument.
Solution: Check for this error. (closes #7868 )
2021-02-21 22:20:24 +01:00
Bram Moolenaar
7e82c5f338
patch 8.2.2539: Vim9: return from finally block causes a hang
...
Problem: Vim9: return from finally block causes a hang.
Solution: Store both the finally and endtry indexes. (closes #7885 )
2021-02-21 21:32:45 +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
ada1d870b4
patch 8.2.2532: Vim9: confusing error if :k is used with a range
...
Problem: Vim9: confusing error if :k is used with a range.
Solution: Give an error about the range. (issue #7874 )
2021-02-20 08:16:51 +01:00
Bram Moolenaar
10b9421f3b
patch 8.2.2531: Vim9: the :k command is obscure
...
Problem: Vim9: the :k command is obscure.
Solution: Disallow using :k, can use :mark instead. (closes #7874 )
2021-02-19 21:42:57 +01:00
Bram Moolenaar
e0890d678d
patch 8.2.2525: Vim9: only local variables checked for a name
...
Problem: Vim9: only local variables checked for a name.
Solution: Also check arguments and script variables. (closes #7838 )
2021-02-17 14:52:14 +01:00