Bram Moolenaar
a629495530
patch 8.2.2225: Vim9: error when using :import in legacy script twice
...
Problem: Vim9: error when using :import in legacy script twice.
Solution: Make it possible to redefine an import when reloading.
2020-12-27 13:39:50 +01:00
Bram Moolenaar
07a65d26e7
patch 8.2.2224: Vim9: crash if script reloaded with different variable type
...
Problem: Vim9: crash if script reloaded with different variable type.
Solution: Check the type when accessing the variable.
2020-12-26 20:09:15 +01:00
Bram Moolenaar
2b32700dab
patch 8.2.2222: Vim9: cannot keep script variables when reloading
...
Problem: Vim9: cannot keep script variables when reloading.
Solution: Add the "noclear" argument to :vim9script.
2020-12-26 15:39:31 +01:00
Bram Moolenaar
9e68c32563
patch 8.2.2209: Vim9: return type of => lambda not parsed
...
Problem: Vim9: return type of => lambda not parsed.
Solution: Parse and use the return type.
2020-12-25 12:38:04 +01:00
Bram Moolenaar
c0913d023b
patch 8.2.2093: Vim9: script test sometimes fails
...
Problem: Vim9: script test sometimes fails.
Solution: Do not find a script variable by its typval if the name was
cleared.
2020-12-05 14:44:37 +01:00
Bram Moolenaar
3e2534ed1a
patch 8.2.1918: Vim9: E1100 mentions :let
...
Problem: Vim9: E1100 mentions :let.
Solution: Mention "var". (closes #7207 )
2020-10-28 17:55:31 +01:00
Bram Moolenaar
39ca4127a0
patch 8.2.1870: Vim9: no need to keep all script variables
...
Problem: Vim9: no need to keep all script variables.
Solution: Only keep script variables when a function was defined that could
use them. Fix freeing static string on exit.
2020-10-20 14:25:07 +02:00
Bram Moolenaar
fbbcd00367
patch 8.2.1846: Vim9: block variables are not found in compiled function
...
Problem: Vim9: variables declared in a local block are not found in
when a function is compiled.
Solution: Look for script variables in sn_all_vars.
2020-10-15 12:46:44 +02:00
Bram Moolenaar
8d739de43b
patch 8.2.1845: Vim9: function defined in a block can't use block variables
...
Problem: Vim9: function defined in a block can't use variables defined in
that block.
Solution: First step: Make a second hashtab that holds all script variables,
also block-local ones, with more information.
2020-10-14 19:39:19 +02:00
Bram Moolenaar
10c65860f8
patch 8.2.1813: Vim9: can assign wrong type to script dict
...
Problem: Vim9: can assign wrong type to script dict. (Christian J. Robinson)
Solution: Check the type if known.
2020-10-08 21:16:42 +02:00
Bram Moolenaar
30fd8204ce
patch 8.2.1744: Vim9: using ":const!" is weird
...
Problem: Vim9: using ":const!" is weird.
Solution: Use "var" - "final" - "const" like Dart. "let" still works for
now.
2020-09-26 15:09:30 +02:00
Bram Moolenaar
f0afd9e182
patch 8.2.1674: Vim9: internal error when using variable that was not set
...
Problem: Vim9: internal error when using variable that was not set.
Solution: Give a meaningful error. (closes #6937 )
2020-09-13 18:57:47 +02:00
Bram Moolenaar
c1ec0422e4
patch 8.2.1650: Vim9: result of && and || expression is not bool in script
...
Problem: Vim9: result of && and || expression cannot be assigned to a bool
at the script level.
Solution: Add the VAR_BOOL_OK flag. Convert to bool when needed.
2020-09-09 22:27:58 +02:00
Bram Moolenaar
8b565c2c15
patch 8.2.1551: Vim9: error for argument type does not mention the number
...
Problem: Vim9: error for argument type does not mention the number.
Solution: Pass the argument number to where the error is given.
2020-08-30 23:24:20 +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
81e17fbe00
patch 8.2.1503: Vim9: error for autocmd defined in :def in legacy script
...
Problem: Vim9: error for an autocmd defined in a :def function in legacy
Vim script.
Solution: Don't check the variable type. (closes #6758 )
2020-08-21 21:55:43 +02:00
Bram Moolenaar
451c2e3536
patch 8.2.1460: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more messages into errors.h.
2020-08-15 16:33:28 +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
f5a48010ef
patch 8.2.1342: Vim9: accidentally using "t" gives a confusing error
...
Problem: Vim9: accidentally using "x" gives a confusing error.
Solution: Disallow using ":t" in Vim9 script. (issue #6399 )
2020-08-01 17:00:03 +02:00
Bram Moolenaar
68e30449a2
patch 8.2.1311: test failures with legacy Vim script
...
Problem: Test failures with legacy Vim script.
Solution: Actually check for Vim9 script.
2020-07-28 21:15:07 +02:00
Bram Moolenaar
ae616494d7
patch 8.2.1308: Vim9: accidentally using "x" causes Vim to exit
...
Problem: Vim9: accidentally using "x" causes Vim to exit.
Solution: Disallow using ":x" or "xit" in Vim9 script. (closes #6399 )
2020-07-28 20:07:27 +02:00
Bram Moolenaar
40f4f7a48c
patch 8.2.1287: Vim9: crash when using an imported function
...
Problem: Vim9: crash when using an imported function.
Solution: Add the function type to the imported entry. (closes #6522 )
2020-07-23 22:41:43 +02:00
Bram Moolenaar
5a67c37a55
patch 8.2.1275: Vim9: compiler warning for buffer size
...
Problem: Vim9: compiler warning for buffer size.
Solution: Change the offset from 10 to 15. (Dominique Pellé, closes #6518 )
2020-07-23 14:39:47 +02:00
Bram Moolenaar
4cdb13ce81
patch 8.2.1272: Vim9: type not checked if declaration also assigns value
...
Problem: Vim9: type not checked if declaration also assigns value.
Solution: Check the type. (issue #6507 )
2020-07-22 21:45:14 +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
6110e79a58
patch 8.2.1160: Vim9: memory leak in allocated types
...
Problem: Vim9: memory leak in allocated types.
Solution: Free the type pointers.
2020-07-08 19:35:21 +02:00
Bram Moolenaar
cbb6bdcd89
patch 8.2.1148: warning for using int instead of size_t
...
Problem: Warning for using int instead of size_t.
Solution: Change "len" argument to size_t. (Mike Williams)
2020-07-06 21:53:17 +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
1c991144c5
patch 8.2.1124: Vim9: no line break allowed in :import command
...
Problem: Vim9: no line break allowed in :import command.
Solution: Skip over line breaks.
2020-07-04 13:15:31 +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
3b74b6b4bb
patch 8.2.1012: Vim9: cannot declare single character script variables
...
Problem: Vim9: cannot declare single character script variables.
Solution: Don't see "b:", "s:", etc. as namespace. Fix item size of
sn_var_vals.
2020-06-19 19:01:43 +02:00
Bram Moolenaar
c785b9a7f4
patch 8.2.1011: Vim9: some code not tested
...
Problem: Vim9: some code not tested.
Solution: Add a few more test cases. Reorder checks for clearer error.
Remove unreachable code.
2020-06-19 18:34:15 +02:00
Bram Moolenaar
101f4810e2
patch 8.2.0992: Vim9: crash when using :import in the Vim command
...
Problem: Vim9: crash when using :import in the Vim command.
Solution: Give an error when using :import outside of a script.
(closes #6271 )
2020-06-16 23:18:51 +02:00
Bram Moolenaar
984dddbef4
patch 8.2.0975: Vim9: script variable does not accept optional s: prefix
...
Problem: Vim9: script variable does not accept optional s: prefix.
Solution: Adjust the accepted syntax.
2020-06-14 12:50:24 +02:00
Bram Moolenaar
f3decc5830
patch 8.2.0974: Vim9: memory leak when script var has wrong type
...
Problem: Vim9: memory leak when script var has wrong type.
Solution: Free the variable name.
2020-06-13 19:56:38 +02:00
Bram Moolenaar
34db91f7a4
patch 8.2.0973: Vim9: type is not checked when assigning to a script variable
...
Problem: Vim9: type is not checked when assigning to a script variable.
Solution: Check the type.
2020-06-13 19:00:10 +02:00
Bram Moolenaar
c82a5b5da5
patch 8.2.0972: Vim9 script variable declarations need a type
...
Problem: Vim9 script variable declarations need a type.
Solution: Make "let var: type" declare a script-local variable.
2020-06-13 18:09:19 +02:00
Bram Moolenaar
9721fb4ea3
patch 8.2.0960: cannot use :import in legacy Vim script
...
Problem: Cannot use :import in legacy Vim script.
Solution: Support :import in any Vim script.
2020-06-11 23:10:46 +02:00
Bram Moolenaar
822ba24743
patch 8.2.0818: Vim9: using a discovery phase doesn't work well
...
Problem: Vim9: using a discovery phase doesn't work well.
Solution: Remove the discovery phase, instead compile a function only when
it is used. Add :defcompile to compile def functions earlier.
2020-05-24 23:00:18 +02:00
Bram Moolenaar
74fae513f8
patch 8.2.0806: using "func!" after vim9script gives confusing error
...
Problem: using "func!" after vim9script gives confusing error.
Solution: Give E477. (closes #6107 )
2020-05-21 21:50:58 +02:00
Bram Moolenaar
227a69de1e
patch 8.2.0755: Vim9: No error when variable initializer is not a constant
...
Problem: Vim9: No error when variable initializer is not a constant.
Solution: Return FAIL when trying to get a variable value. Do not execute a
script when an error is deteted in the first or second phase.
2020-05-15 18:17:28 +02:00
Bram Moolenaar
7e5bd91dc9
patch 8.2.0731: Vim9: parsing declarations continues after :finish
...
Problem: Vim9: parsing declarations continues after :finish.
Solution: Bail out when encountering :finish.
2020-05-10 21:20:29 +02:00
Bram Moolenaar
09689a0284
patch 8.2.0725: Vim9: cannot call a function declared later in Vim9 script
...
Problem: Vim9: cannot call a function declared later in Vim9 script.
Solution: Make two passes through the script file.
2020-05-09 22:50:08 +02:00
Bram Moolenaar
4c17ad94ec
patch 8.2.0650: Vim9: script function can be deleted
...
Problem: Vim9: script function can be deleted.
Solution: Disallow deleting script function. Delete functions when sourcing
a script again.
2020-04-27 22:47:51 +02:00
Bram Moolenaar
20431c9dbb
patch 8.2.0419: various memory leaks in Vim9 script code
...
Problem: Various memory leaks in Vim9 script code.
Solution: Fix the leaks. (Ozaki Kiichi, closes #5814 )
2020-03-20 18:39:46 +01:00
Bram Moolenaar
5269bd2a72
patch 8.2.0368: Vim9: import that redefines local variable does not fail
...
Problem: Vim9: import that redefines local variable does not fail.
Solution: Check for already defined symbols.
2020-03-09 19:25:27 +01:00
Bram Moolenaar
fa29c8abd6
patch 8.2.0313: Vim9: insufficient script tests
...
Problem: Vim9: insufficient script tests.
Solution: Add tests. Make import of alphanumeric name work.
2020-02-23 22:35:05 +01:00
Bram Moolenaar
f2d5c240a5
patch 8.2.0312: Vim9: insufficient script tests
...
Problem: Vim9: insufficient script tests.
Solution: Add more tests. Make "import * as Name" work.
2020-02-23 21:25:54 +01:00
Bram Moolenaar
4549ece47c
patch 8.2.0172: Coverity warning for not restoring character
...
Problem: Coverity warning for not restoring character.
Solution: Restore the character also in case of failure.
2020-01-28 23:13:42 +01:00
Bram Moolenaar
a5d5953d59
patch 8.2.0155: warnings from MinGW compiler; tests fail without +float
...
Problem: Warnings from MinGW compiler. (John Marriott) Json test fails when
building without +float feature.
Solution: Init variables. Fix Json parsing. Skip a few tests that require
the +float feature.
2020-01-26 21:42:03 +01:00