Yegappan Lakshmanan
efbfa867a1
patch 8.2.4770: cannot easily mix expression and heredoc
...
Problem: Cannot easily mix expression and heredoc.
Solution: Support in heredoc. (Yegappan Lakshmanan, closes #10138 )
2022-04-17 12:47:40 +01:00
Yegappan Lakshmanan
7c7e19cf50
patch 8.2.4716: memory allocation failure not tested when defining a function
...
Problem: Memory allocation failure not tested when defining a function.
Solution: Add a test. (Yegappan Lakshmanan, closes #10127 )
2022-04-09 11:09:07 +01:00
Bram Moolenaar
7a411a306f
patch 8.2.4682: Vim9: can use :unlockvar for const variable
...
Problem: Vim9: can use :unlockvar for const variable. (Ernie Rael)
Solution: Check whether the variable is a const.
2022-04-04 14:58:06 +01:00
Bram Moolenaar
96e08e028c
patch 8.2.4659: invalid memory access when using printable function name
...
Problem: Invalid memory access when using printable function name.
Solution: Adjust copied name length.
2022-03-31 21:40:33 +01:00
Bram Moolenaar
a6c18d38ca
patch 8.2.4657: errors for functions are sometimes hard to read
...
Problem: Errors for functions are sometimes hard to read.
Solution: Use printable_func_name() in more places.
2022-03-31 20:02:56 +01:00
Bram Moolenaar
c0ceeeb839
patch 8.2.4650: "import autoload" only works with using 'runtimepath'
...
Problem: "import autoload" only works with using 'runtimepath'.
Solution: Also support a relative and absolute file name.
2022-03-30 21:12:27 +01:00
Bram Moolenaar
1d9cef769d
patch 8.2.4586: Vim9: no error for using lower case name for "func" argument
...
Problem: Vim9: no error for using lower case name for "func" argument.
(Ernie Rael)
Solution: Check the name as soon as the type is known.
2022-03-17 16:30:03 +00:00
Bram Moolenaar
fb43cfc2c6
patch 8.2.4548: script-local function is deleted when used in a funcref
...
Problem: Script-local function is deleted when used in a funcref.
Solution: Do not consider a function starting with "<SNR>" reference
counted. (closes #9916 , closes #9820 )
2022-03-11 18:54:17 +00:00
Bram Moolenaar
ed0c62e7b1
patch 8.2.4529: Vim9: comparing partial with function fails
...
Problem: Vim9: comparing partial with function fails.
Solution: Support this comparison. Avoid a crash. (closes #9909 )
Add more test cases.
2022-03-08 19:43:55 +00:00
Bram Moolenaar
673bcb10eb
patch 8.2.4528: crash when using null_function for a partial
...
Problem: Crash when using null_function for a partial.
Solution: Don't call fname_trans_sid() with NULL. (closes #9908 )
2022-03-08 16:52:24 +00:00
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
9383a3afb6
patch 8.2.4472: Coverity warns for use of a freed function name
...
Problem: Coverity warns for use of a freed function name.
Solution: Only check an autoload name when is prefixed.
2022-02-25 21:35:17 +00:00
Bram Moolenaar
dea5ab0fc5
patch 8.2.4460: Vim9: wrong error for defining dict function
...
Problem: Vim9: wrong error for defining dict function.
Solution: Explicitly check for trying to define a dict function.
(closes 9827)
2022-02-23 22:12:02 +00:00
Bram Moolenaar
c2f17f7e64
patch 8.2.4429: using script-local function from the wrong script
...
Problem: Using script-local function from the wrong script when using a
partial. (Yegappan Lakshmanan)
Solution: Include the script ID in the partial name.
2022-02-21 13:13:50 +00:00
Bram Moolenaar
e89bfd212b
patch 8.2.4417: using NULL pointer
...
Problem: Using NULL pointer.
Solution: Set offset after checking for NULL pointer.
2022-02-18 18:34:45 +00:00
Bram Moolenaar
1fca5f3e86
patch 8.2.4416: Vim9: using a script-local function requires using "s:"
...
Problem: Vim9: using a script-local function requires using "s:" when
setting 'completefunc'.
Solution: Do not require "s:" in Vim9 script. (closes #9796 )
2022-02-18 17:50:47 +00:00
Bram Moolenaar
4b1d963972
patch 8.2.4375: ctx_imports is not used
...
Problem: ctx_imports is not used.
Solution: Delete ctx_imports. Add missing dependency.
2022-02-13 21:51:08 +00:00
Bram Moolenaar
4525a57afb
patch 8.2.4367: calling in_vim9script() multiple times
...
Problem: Calling in_vim9script() multiple times.
Solution: Call it once and keep the result.
2022-02-13 11:57:33 +00:00
Bram Moolenaar
cdf0485969
patch 8.2.4365: sticky command modifiers are too sticky
...
Problem: sticky command modifiers are too sticky.
Solution: Do not apply command modifiers to a called function. (closes #9751 )
2022-02-12 22:13:06 +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
dce2441a60
patch 8.2.4332: Vim9: incomplete test for existing script variable in block
...
Problem: Vim9: incomplete test for existing script variable in block.
Solution: Add a couple more tests. Fix uncovered problem.
2022-02-08 20:35:30 +00:00
Bram Moolenaar
3787f26c2e
patch 8.2.4324: Vim9: script-local function name can start with "_"
...
Problem: Vim9: script-local function name can start with "_".
Solution: Check for leading capital after "s:". Correct error message.
2022-02-07 21:54:01 +00:00
Bram Moolenaar
8164f6ea3c
patch 8.2.4308: Vim9: cannot list autoload function
...
Problem: Vim9: cannot list autoload function.
Solution: Don't give an error for using # when listing a function.
(closes #9703 )
2022-02-06 13:08:41 +00:00
Bram Moolenaar
48a604845e
patch 8.2.4269: Coverity warns for using a NULL pointer
...
Problem: Coverity warns for using a NULL pointer.
Solution: Check for "name" to not be NULL.
2022-01-31 11:44:48 +00:00
Bram Moolenaar
5703310e64
patch 8.2.4266: compiler warning for uninitialized variable
...
Problem: Compiler warning for uninitialized variable.
Solution: Initialize saved_did_emsg.
2022-01-30 19:37:52 +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
848faddb87
patch 8.2.4260: Vim9: can still use a global function without g:
...
Problem: Vim9: can still use a global function without g: at the script
level.
Solution: Also check for g: at the script level. (issue #9637 )
2022-01-30 15:28:30 +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
acc4b5648b
patch 8.2.4202: Vim9: cannot export function that exists globally
...
Problem: Vim9: cannot export function that exists globally.
Solution: When checking if a function already exists only check for
script-local functions. (closes #9615 )
2022-01-24 13:54:45 +00:00
Bram Moolenaar
19e69a6330
patch 8.2.4174: Vim9: can use an autoload name in normal script
...
Problem: Vim9: can use an autoload name in normal script.
Solution: Disallow using an autoload name.
2022-01-21 20:37:05 +00:00
Bram Moolenaar
f0e7e6365e
patch 8.2.4171: cannot invoke option function using autoload import
...
Problem: Cannot invoke option function using autoload import.
Solution: Expand the import to an autoload function name. (closes #9578 )
2022-01-21 13:29:56 +00:00
Bram Moolenaar
e6a4200ff4
patch 8.2.4168: disallowing empty function name breaks existing plugins
...
Problem: Disallowing empty function name breaks existing plugins.
Solution: Allow empty function name in legacy script.
2022-01-21 10:32:58 +00:00
Bram Moolenaar
6f0ddbf00d
patch 8.2.4164: error in legacy code for function shadowing variable
...
Problem: Error in legacy code for function shadowing variable.
Solution: Only give the error in Vim9 script.
2022-01-20 19:56:49 +00:00
Bram Moolenaar
2017d6f3b1
patch 8.2.4163: no error for omitting function name after autoload prefix
...
Problem: No error for omitting function name after autoload prefix.
Solution: Check for missing function name. (issue #9577 )
2022-01-20 19:38:46 +00:00
Bram Moolenaar
9c7cae66bc
patch 8.2.4162: Vim9: no error for redefining function with export
...
Problem: Vim9: no error for redefining function with export.
Solution: Check for existing function with/without prefix. (closes #9577 )
2022-01-20 19:10:25 +00:00
Bram Moolenaar
937610bc9f
patch 8.2.4145: confusing error when using name of import for a function
...
Problem: Confusing error when using name of import for a function.
Solution: Pass a flag to trans_function_name().
2022-01-19 17:21:29 +00:00
Bram Moolenaar
15d1635e50
patch 8.2.4123: complete function cannot be import.Name
...
Problem: Complete function cannot be import.Name.
Solution: Dereference the function name if needed. Also: do not see
"import.Name" as a builtin function. (closes #9541 )
2022-01-17 20:09:08 +00:00
Bram Moolenaar
c84287d6d8
patch 8.2.4114: Vim9: type checking for a funcref does not work for method
...
Problem: Vim9: type checking for a funcref does not work for when it is
used in a method.
Solution: Pass the base to where the type is checked.
2022-01-16 18:06:21 +00:00
Bram Moolenaar
d9d2fd0aa3
patch 8.2.4086: "cctx" argument of find_func_even_dead() is unused
...
Problem: "cctx" argument of find_func_even_dead() is unused.
Solution: Remove the argument.
2022-01-13 21:15:21 +00:00
Bram Moolenaar
78a70533c3
patch 8.2.4075: test failures
...
Problem: Test failures.
Solution: Change check for NULL pointer.
2022-01-13 13:24:34 +00:00
Bram Moolenaar
54598066ca
patch 8.2.4073: Coverity warns for using NULL pointer
...
Problem: Coverity warns for using NULL pointer.
Solution: Bail out when running out of memory. Check for running over end of
a string.
2022-01-13 12:05:09 +00:00
Bram Moolenaar
f111cdfae6
patch 8.2.4067: Vim9: cannot call imported function with :call
...
Problem: Vim9: cannot call imported function with :call. (Drew Vogel)
Solution: Translate the function name. (closes #9510 )
2022-01-12 12:48:17 +00:00
Bram Moolenaar
b8822442d7
patch 8.2.4063: Vim9: exported function in autoload script not found
...
Problem: Vim9: exported function in autoload script not found. (Yegappan
Lakshmanan)
Solution: Use the autoload prefix to search for the function.
2022-01-11 15:24:05 +00:00
Bram Moolenaar
5e6b9882fe
patch 8.2.4055: Vim9: line break in expression causes v:errmsg to be fillec
...
Problem: Vim9: line break in expression causes v:errmsg to be filled.
(Yegappan Lakshmanan)
Solution: Do not give an error when skipping over an expression.
2022-01-10 18:50:52 +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
04935fb17e
patch 8.2.4043: using int for second argument of ga_init2()
...
Problem: Using int for second argument of ga_init2().
Solution: Remove unnessary type cast (int) when using sizeof().
2022-01-08 16:19:22 +00:00
Bram Moolenaar
9f1a39a5d1
patch 8.2.4040: keeping track of allocated lines is too complicated
...
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end.
2022-01-08 15:39:39 +00:00
Dominique Pelle
748b308eeb
patch 8.2.4038: various code not used when features are disabled
...
Problem: Various code not used when features are disabled.
Solution: Add #ifdefs. (Dominique Pellé, closes #9491 )
2022-01-08 12:41:16 +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