Bram Moolenaar
b2175220da
patch 8.2.4514: Vim9: some flow commands can be shortened
...
Problem: Vim9: some flow commands can be shortened.
Solution: Also require using the full name for ":return", ":enddef",
":continue", ":export" and ":import".
2022-03-05 20:24:41 +00:00
Bram Moolenaar
204852ae2a
patch 8.2.4510: Vim9: shortening commands leads to confusing script
...
Problem: Vim9: shortening commands leads to confusing script.
Solution: In Vim9 script require at least ":cont" for ":continue", "const"
instead of "cons", "break" instead of "brea", "catch" instead of
"cat", "else" instead of "el" "elseif" instead of "elsei" "endfor"
instead of "endfo" "endif" instead of "en" "endtry" instead of
"endt", "finally" instead of "fina", "throw" instead of "th",
"while" instead of "wh".
2022-03-05 12:56:44 +00:00
Bram Moolenaar
330a388e18
patch 8.2.4508: Vim9: cannot assign to a global variable on the command line
...
Problem: Vim9: cannot assign to a global variable on the command line.
Solution: Allow using :vim9cmd for assignment on the command line.
2022-03-05 11:05:57 +00:00
Bram Moolenaar
6aca4d3c2b
patch 8.2.4503: Vim9: there is no point in supporting :Print and :mode
...
Problem: Vim9: there is no point in supporting :Print and :mode.
Solution: Do not recognize :Print and :mode as commands. (closes #9870 )
2022-03-04 17:10:19 +00:00
Bram Moolenaar
0e1574c406
patch 8.2.4500: Vim9: can declare a global variable on the command line
...
Problem: Vim9: can declare a global variable on the command line.
Solution: Disallow declaring a variable on the command line. (closes #9881 )
2022-03-03 17:05:35 +00:00
Bram Moolenaar
28bf649a57
patch 8.2.4499: Vim9: at the script level declarations leak to next block
...
Problem: Vim9: at the script level declarations leak from try block to
catch and finally block.
Solution: End the block and start a new one. (closes #9883 )
2022-03-03 15:11:20 +00:00
Bram Moolenaar
0c7f2610de
patch 8.2.4410: Vim9: some code not covered by tests
...
Problem: Vim9: some code not covered by tests.
Solution: Add a few more tests. Remove dead code.
2022-02-17 19:44:07 +00:00
Bram Moolenaar
75e27d78f5
patch 8.2.4371: Vim9: can create a script variable from a legacy function
...
Problem: Vim9: can create a script variable from a legacy function.
Solution: Disallow creating a script variable from a function.
2022-02-13 13:56:29 +00:00
Bram Moolenaar
a749a42ed2
patch 8.2.4360: Vim9: allowing use of "s:" leads to inconsistencies
...
Problem: Vim9: allowing use of "s:" leads to inconsistencies.
Solution: Disallow using "s:" in Vim9 script at the script level.
2022-02-12 19:52:25 +00:00
Bram Moolenaar
90a57168a4
patch 8.2.4358: Vim9: line number of exception is not set
...
Problem: Vim9: line number of exception is not set.
Solution: Set the line number before throwing an exception. (closes #9755 )
2022-02-12 14:23:17 +00:00
Bram Moolenaar
8cbf249917
patch 8.2.4314: test fails where lines are skipped
...
Problem: Test fails where lines are skipped.
Solution: Only give an error when not skipping commands.
2022-02-06 20:28:13 +00:00
Bram Moolenaar
107f7325f6
patch 8.2.4312: no error for using :vim9script in a :def function
...
Problem: No error for using :vim9script in a :def function.
Solution: Give an error when compiling.
2022-02-06 17:30:41 +00:00
Bram Moolenaar
21ebb0899e
patch 8.2.4297: Vim9: not all code covered by tests
...
Problem: Vim9: not all code covered by tests.
Solution: Add a couple more tests.
2022-02-04 21:58:58 +00:00
Bram Moolenaar
a1c5195180
patch 8.2.4285: Vim9: type of item in for loop not checked properly
...
Problem: Vim9: type of item in for loop not checked properly.
Solution: Adjust the type checking. (closes #9683 )
2022-02-02 16:20:26 +00:00
Bram Moolenaar
d8fe6d34bb
patch 8.2.4264: Vim9: can use old style autoload function name
...
Problem: Vim9: can use old style autoload function name.
Solution: Give an error for old style autoload function name.
2022-01-30 18:40:44 +00:00
Bram Moolenaar
62aec93bfd
patch 8.2.4257: Vim9: finding global function without g: prefix inconsistent
...
Problem: Vim9: finding global function without g: prefix but not finding
global variable is inconsistent.
Solution: Require using g: for a global function. Change the vim9.vim
script into a Vim9 script with exports. Fix that import in legacy
script does not work.
2022-01-29 21:45:34 +00:00
Bram Moolenaar
bed34f0a8a
patch 8.2.4147: E464 does not always include the offending command
...
Problem: E464 does not always include the offending command.
Solution: Add another error message with "%s". (closes #9564 )
2022-01-19 20:48:37 +00:00
Bram Moolenaar
53c296112e
patch 8.2.4071: Vim9: no detection of return in try/endtry
...
Problem: Vim9: no detection of return in try/endtry. (Dominique Pellé)
Solution: Check if any of the blocks inside try/endtry did not end in
return.
2022-01-12 16:18:18 +00:00
Bram Moolenaar
160aa86a9d
patch 8.2.4057: Vim9: not fully implementing the autoload mechanism
...
Problem: Vim9: not fully implementing the autoload mechanism.
Solution: Allow for exporting a legacy function. Improve test coverage.
2022-01-10 21:29:57 +00:00
Bram Moolenaar
fe2ef0b2cd
patch 8.2.4053: Vim9: autoload mechanism doesn't fully work yet
...
Problem: Vim9: autoload mechanism doesn't fully work yet.
Solution: Define functions and variables with their autoload name, add the
prefix when calling a function, find the variable in the table of
script variables.
2022-01-10 18:08:00 +00:00
Bram Moolenaar
dc4451df61
patch 8.2.4050: Vim9: need to prefix every item in an autoload script
...
Problem: Vim9: need to prefix every item in an autoload script.
Solution: First step in supporting "vim9script autoload" and "import
autoload".
2022-01-09 21:36:37 +00:00
Bram Moolenaar
d844862bce
patch 8.2.4036: Vim9: script test file is getting too long
...
Problem: Vim9: script test file is getting too long.
Solution: Split the import/export functionality to a separate file.
2022-01-07 21:39:52 +00:00
Bram Moolenaar
71f21938bc
patch 8.2.4030: a script local funcref is not found from a mapping
...
Problem: A script local funcref is not found from a mapping.
Solution: When looking for a function, also find a script-local funcref.
(closes #9485 )
2022-01-07 18:20:55 +00:00
Bram Moolenaar
2b04d5f1ef
patch 8.2.4027: import test fails on MS-Windows
...
Problem: Import test fails on MS-Windows.
Solution: Use a different directory name.
2022-01-07 14:39:56 +00:00
Bram Moolenaar
834d41853e
patch 8.2.4025: error for import not ending in .vim does not work for .vimrc
...
Problem: Error for import not ending in .vim does not work for .vimrc.
Solution: Check that .vim is the end. (closes #9484 )
2022-01-07 13:38:24 +00:00
Bram Moolenaar
32884ad753
patch 8.2.4024: confusing error message if imported name is used directly
...
Problem: Confusing error message if imported name is used directly.
Solution: Give a better error message.
2022-01-07 12:45:29 +00:00
Bram Moolenaar
d5f400c607
patch 8.2.4019: Vim9: import mechanism is too complicated
...
Problem: Vim9: import mechanism is too complicated.
Solution: Do not use the Javascript mechanism but a much simpler one.
2022-01-06 21:10:28 +00:00
Bram Moolenaar
b79ee0c299
patch 8.2.3965: Vim9: no easy way to check if Vim9 script is supported
...
Problem: Vim9: no easy way to check if Vim9 script is supported.
Solution: Add has('vim9script').
2022-01-01 12:17:00 +00:00
Bram Moolenaar
71eb3ad579
patch 8.2.3901: Vim9: Cannot set 'cpo' in main .vimrc if using Vim9 script
...
Problem: Vim9: Cannot set 'cpo' in main .vimrc if using Vim9 script.
Solution: Do not restore 'cpo' at the end of the main .vimrc.
2021-12-26 12:07:30 +00:00
Bram Moolenaar
1802405d71
patch 8.2.3897: Vim9: second argument of map() and filter() not checked
...
Problem: Vim9: the second argument of map() and filter() is not checked at
compile time.
Solution: Add more specific type check for the second argument.
2021-12-25 21:43:28 +00:00
Bram Moolenaar
310091d20f
patch 8.2.3878: Vim9: debugger tries to read more lines than there are
...
Problem: Vim9: debugger tries to read more lines than there are.
Solution: Check the number of lines. (closes #9394 )
2021-12-23 21:14:37 +00:00
Bram Moolenaar
a99fb23842
patch 8.2.3859: Vim9: some code lines not tested
...
Problem: Vim9: some code lines not tested.
Solution: Add a few specific tests.
2021-12-20 12:25:03 +00:00
Bram Moolenaar
003312b1d2
patch 8.2.3858: Vim9: not enough tests
...
Problem: Vim9: not enough tests.
Solution: Add tests for :try/:catch and :redir. Add missing type check.
2021-12-20 10:55:35 +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
f8a79fc346
patch 8.2.3807: Vim9: can call import with star directly
...
Problem: Vim9: can call import with star directly.
Solution: Check that the import used star.
2021-12-14 12:06:16 +00:00
Bram Moolenaar
2ef9156b42
patch 8.2.3783: confusing error for using a variable as a function
...
Problem: Confusing error for using a variable as a function.
Solution: If a function is not found but there is a variable, give a more
useful error. (issue #9310 )
2021-12-11 16:14:07 +00:00
Bram Moolenaar
052ff291d7
patch 8.2.3782: Vim9: no error if a function shadows a script variable
...
Problem: Vim9: no error if a function shadows a script variable.
Solution: Check the function doesn't shadow a variable. (closes #9310 )
2021-12-11 13:54:46 +00:00
Bram Moolenaar
9537e37b11
patch 8.2.3778: lambda debug test fails in some configurations
...
Problem: Lambda debug test fails in some configurations.
Solution: Check feature in a legacy function.
2021-12-10 21:05:53 +00:00
Bram Moolenaar
9fffef9f35
patch 8.2.3775: Vim9: lambda compiled without outer context when debugging
...
Problem: Vim9: lambda compiled without outer context when debugging.
Solution: When compiling a lambda for debugging also compile it without.
(closes #9302 )
2021-12-10 16:55:58 +00:00
Bram Moolenaar
c7d5fc8622
patch 8.2.3746: cannot disassemble function starting with "debug" or "profile"
...
Problem: Cannot disassemble function starting with "debug" or "profile".
Solution: Check for white space following. (closes #9273 )
2021-12-05 17:20:24 +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
3b3755fe19
patch 8.2.3650: Vim9: for loop variable can be a list member
...
Problem: Vim9: for loop variable can be a list member.
Solution: Check for valid variable name. (closes #9179 )
2021-11-22 20:10:18 +00:00
Bram Moolenaar
7a53f29c03
patch 8.2.3649: Vim9: error for variable declared in while loop
...
Problem: Vim9: error for variable declared in while loop.
Solution: Do not keep the first variable. (closes #9191 )
2021-11-22 18:31:02 +00:00
Dominique Pelle
923dce2b07
patch 8.2.3637: typos in test files
...
Problem: Typos in test files.
Solution: Correct the typos. (Dominique Pellé, closes #9175 )
2021-11-21 11:36:04 +00:00
Bram Moolenaar
06ca48a40f
patch 8.2.3558: Vim9: asserting the wrong variable
...
Problem: Vim9: asserting the wrong variable.
Solution: Don't use Foo, use Goo.
2021-10-23 10:25:21 +01:00
Bram Moolenaar
5fe07d2e08
patch 8.2.3557: Vim9: cannot call imported funcref at script level
...
Problem: Vim9: cannot call imported funcref at script level.
Solution: Check for an imported function. (closes #9007 )
2021-10-22 22:17:53 +01:00
Bram Moolenaar
b16ff292ad
patch 8.2.3457: MS-Windows Vim9: test executed and fails
...
Problem: MS-Windows Vim9: test executed and fails.
Solution: Add extra check for not being on MS-Windows.
2021-09-26 20:14:39 +01:00
Bram Moolenaar
a9e3d56087
patch 8.2.3413: Vim9: too many characters are allowed in import name
...
Problem: Vim9: too many characters are allowed in import name.
Solution: Disallow ':' and '#', check for white space. (closes #8845 )
2021-09-08 12:31:35 +02:00
Bram Moolenaar
af2d5d2ce2
patch 8.2.3412: Vim9: importing the wrong file
...
Problem: Vim9: importing the wrong file.
Solution: Correct the file name. Delete the file afterwards.
2021-09-07 22:35:34 +02:00
Bram Moolenaar
6853c38b78
patch 8.2.3411: Vim9: crash when using base name of import
...
Problem: Vim9: crash when using base name of import. (Naohiro Ono)
Solution: Check the import flags. (closes #8843 )
2021-09-07 22:12:19 +02:00