Bram Moolenaar
0d3de8cb59
patch 8.2.2391: memory leak when creating a global function with closure
...
Problem: Memory leak when creating a global function with closure.
Solution: Create a separate partial for every instantiated function.
2021-01-22 20:46:27 +01:00
Bram Moolenaar
f898f7c68d
patch 8.2.2364: Vim9: line break in lambda accesses freed memory
...
Problem: Vim9: line break in lambda accesses freed memory.
Solution: Make a copy of the return type. (closes #7664 )
2021-01-16 18:09:52 +01:00
Bram Moolenaar
648ea76e1d
patch 8.2.2357: Vim9: crash when parsing function return type fails
...
Problem: Vim9: crash when parsing function return type fails.
Solution: Bail out and set return type to "unknown". (closes #7685 )
2021-01-15 19:04:32 +01:00
Bram Moolenaar
b657198cb3
patch 8.2.2316: Vim9: cannot list a lambda function
...
Problem: Vim9: cannot list a lambda function.
Solution: Support the <lambda>9 notation, like :disassemble. (closes #7634 )
2021-01-08 22:24:19 +01:00
Bram Moolenaar
832ea89ca9
patch 8.2.2315: Vim9: "enddef" as dict key misintepreted as function end
...
Problem: Vim9: "enddef" as dict key misintepreted as function end.
Solution: Check for following colon. (closes #7640 )
2021-01-08 21:55:26 +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
32b3f82010
patch 8.2.2306: Vim9: when using function reference type is not checked
...
Problem: Vim9: when using function reference type is not checked.
Solution: When using a function reference lookup the type and check the
argument types. (issue #7629 )
2021-01-06 21:59:39 +01:00
Bram Moolenaar
cef1270dec
patch 8.2.2298: Vim9: comment right after "(" of function not recognized
...
Problem: Vim9: comment right after "(" of function not recognized.
Solution: Do not skip over white space before calling get_function_args().
(closes #7613 )
2021-01-04 14:09:43 +01:00
Bram Moolenaar
e7a73e0762
patch 8.2.2266: Vim9: it can be hard to see where white space is missing
...
Problem: Vim9: it can be hard to see where white space is missing.
Solution: Mention the text where the error was seen. (closes #7580 )
2021-01-01 19:17:55 +01:00
Bram Moolenaar
b8ba9b9197
patch 8.2.2265: error message for missing endfunc/enddef is last line
...
Problem: Error message for missing endfunc/enddef is last line.
Solution: Report the line where the function starts. (closes #7582 )
2021-01-01 18:54:34 +01:00
Bram Moolenaar
5178b1b02f
patch 8.2.2264: Vim9: no error for mismatched :endfunc or :enddef
...
Problem: Vim9: no error for mismatched :endfunc or :enddef.
Solution: Check for the mismatch. (issue #7582 )
2021-01-01 18:43:51 +01:00
Bram Moolenaar
adc8e44645
patch 8.2.2256: Vim9: cannot use function( after line break in :def function
...
Problem: Vim9: cannot use function( after line break in :def function.
Solution: Check for "(" after "function". (closes #7581 )
2020-12-31 18:28:18 +01:00
Bram Moolenaar
ca2f7e7af3
patch 8.2.2253: Vim9: expr test fails
...
Problem: Vim9: expr test fails.
Solution: Add missing assignment.
2020-12-31 13:39:54 +01:00
Bram Moolenaar
8242ebbdba
patch 8.2.2242: Vim9: bar line continuation does not work at script level
...
Problem: Vim9: line continuation with bar does not work at script level.
Solution: Check for Vim9 script.
2020-12-29 11:15:01 +01:00
Bram Moolenaar
dcc58e031d
patch 8.2.2239: Vim9: concatenating lines with backslash is inconvenient
...
Problem: Vim9: concatenating lines with backslash is inconvenient.
Solution: Support concatenating lines starting with '|', useful for
:autocmd, :command, etc. (closes #6702 )
2020-12-28 20:53:21 +01:00
Bram Moolenaar
e462f52db3
patch 8.2.2227: Vim9: recognizing lambda is too complicated
...
Problem: Vim9: recognizing lambda is too complicated.
Solution: Call compile_lambda() and check for NOTDONE.
2020-12-27 14:43:30 +01:00
Bram Moolenaar
cdc40c43f1
patch 8.2.2223: Vim9: Reloading marks a :def function as deleted
...
Problem: Vim9: Reloading marks a :def function as deleted.
Solution: Clear the function contents but keep the index.
2020-12-26 17:43:08 +01:00
Bram Moolenaar
e5730bdcea
patch 8.2.2220: Vim9: memory leak when parsing nested parenthesis
...
Problem: Vim9: memory leak when parsing nested parenthesis.
Solution: Clear newargs.
2020-12-25 22:30:16 +01:00
Bram Moolenaar
7cfcd0c99c
patch 8.2.2213: checking white space around -> is not backwards compatible
...
Problem: Checking white space around -> is not backwards compatible.
Solution: Only check white space around =>.
2020-12-25 16:11:53 +01:00
Bram Moolenaar
c754b4cc98
patch 8.2.2212: Vim9: lambda with => does not work at the script level
...
Problem: Vim9: lambda with => does not work at the script level.
Solution: Make it work.
2020-12-25 15:24:23 +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
6dd41b1d57
patch 8.2.2205: Vim9: memory leak when parsing lambda fails
...
Problem: Vim9: memory leak when parsing lambda fails.
Solution: Clear growarrays.
2020-12-24 16:06:00 +01:00
Bram Moolenaar
65c4415276
patch 8.2.2204: Vim9: using -> both for method and lambda is confusing
...
Problem: Vim9: using -> both for method and lambda is confusing.
Solution: Use => for lambda in :def function.
2020-12-24 15:14:01 +01:00
Bram Moolenaar
cd45ed03bf
patch 8.2.2188: Vim9: crash when calling global function from :def function
...
Problem: Vim9: crash when calling global function from :def function.
Solution: Set the outer context. Define the partial for the context on the
original function. Use a refcount to keep track of which ufunc is
using a dfunc. (closes #7525 )
2020-12-22 17:35:54 +01:00
Bram Moolenaar
5082471f91
patch 8.2.2172: Vim9: number of arguments is not always checked
...
Problem: Vim9: number of arguments is not always checked. (Yegappan
Lakshmanan)
Solution: Check number of arguments when calling function by name.
2020-12-20 21:10:17 +01:00
Bram Moolenaar
f112f30a82
patch 8.2.2170: Vim9: a global function defined in a :def function fails
...
Problem: Vim9: a global function defined in a :def function fails if it
uses the context.
Solution: Create a partial to store the closure context. (see #7410 )
2020-12-20 17:47:52 +01:00
Bram Moolenaar
17f700ac8b
patch 8.2.2164: Vim9: autoload function doesn't work in uppercased script
...
Problem: Vim9: autoload function doesn't work in script that starts with
an upper case letter.
Solution: Check for the autoload character. (closes #7502 )
2020-12-19 21:23:42 +01:00
Bram Moolenaar
8e7d6223f6
patch 8.2.2160: various typos
...
Problem: Various typos.
Solution: Fix spelling mistakes. (closes #7494 )
2020-12-18 19:49:56 +01:00
Bram Moolenaar
fffdf4754f
patch 8.2.2142: memory leak when heredoc is not terminated
...
Problem: Memory leak when heredoc is not terminated.
Solution: Free heredoc_trimmed.
2020-12-13 21:16:55 +01:00
Bram Moolenaar
b5b9480ee9
patch 8.2.2138: Vim9: "exit_cb" causes Vim to exit
...
Problem: Vim9: "exit_cb" causes Vim to exit.
Solution: Require white space after a command in Vim9 script. (closes #7467 )
Also fix that Vim9 style heredoc was not always recognized.
2020-12-13 17:50:20 +01:00
Bram Moolenaar
6abdcf8285
patch 8.2.2033: Vim9: :def without argument gives compilation error
...
Problem: Vim9: :def without argument gives compilation error.
Solution: Add the DEF instruction. (closes #7344 )
2020-11-22 18:15:44 +01:00
Bram Moolenaar
0ba48e8c27
patch 8.2.2001: Vim9: :def function does not apply 'maxfuncdepth'
...
Problem: Vim9: :def function does not apply 'maxfuncdepth'.
Solution: Use 'maxfuncdepth'. (issue #7313 )
2020-11-17 18:23:19 +01:00
Bram Moolenaar
b4d16cb11d
patch 8.2.1956: Vim9: cannot specify argument types for lambda
...
Problem: Vim9: cannot specify argument types for lambda.
Solution: Allow adding argument types. Check arguments when calling a
function reference.
2020-11-05 18:45:46 +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
7b5d544269
patch 8.2.1796: Vim9: invalid memory access with weird function name
...
Problem: Vim9: invalid memory access with weird function name. (Dhiraj
Mishra)
Solution: Check the name is valid. Add a test.
2020-10-04 13:42:34 +02:00
Bram Moolenaar
cfcd011fcd
patch 8.2.1756: Vim9: :let will soon be disallowed
...
Problem: Vim9: :let will soon be disallowed.
Solution: Add v:disallow_let temporarily. Fix tests.
2020-09-27 15:19:27 +02:00
Bram Moolenaar
280227270c
patch 8.2.1723: Vim9: Variable argument name cannot start with underscore
...
Problem: Vim9: Variable argument name cannot start with underscore.
Solution: Use eval_isnamec1(). (closes #6988 )
2020-09-21 22:02:49 +02:00
Bram Moolenaar
b816dae16d
patch 8.2.1718: Vim9: :def function disallows "firstline" for no good reason
...
Problem: Vim9: :def function disallows "firstline" and "lastline" argument
names for no good reason.
Solution: Don't check the arguments for a :def function. (closes #6986 )
2020-09-20 22:04:00 +02:00
Bram Moolenaar
a05e524f3a
patch 8.2.1712: Vim9: leaking memory when calling a lambda
...
Problem: Vim9: leaking memory when calling a lambda.
Solution: Decrement function reference from ISN_DCALL.
2020-09-19 18:19:19 +02:00
Bram Moolenaar
fdeab65db6
patch 8.2.1711: Vim9: leaking memory when using partial
...
Problem: Vim9: leaking memory when using partial.
Solution: Do delete the function even when it was compiled.
2020-09-19 15:16:50 +02:00
Bram Moolenaar
a187c43cfe
patch 8.2.1698: cannot lock a variable in legacy Vim script like in Vim9
...
Problem: Cannot lock a variable in legacy Vim script like in Vim9.
Solution: Make ":lockvar 0" work.
2020-09-16 21:08:28 +02:00
Bram Moolenaar
3bd8de40b4
patch 8.2.1679: Vim9: ":*" is not recognized as a range
...
Problem: Vim9: ":*" is not recognized as a range.
Solution: Move recognizing "*" into skip_range(). (closes #6838 )
2020-09-14 16:37:34 +02:00
Bram Moolenaar
0f769815c8
patch 8.2.1667: local function name cannot shadow a global function name
...
Problem: Local function name cannot shadow a global function name.
Solution: Ignore global functions when checking a script-local or scoped
function name. (closes #6926 )
2020-09-12 18:32:34 +02:00
Bram Moolenaar
96f8f499ce
patch 8.2.1643: Vim9: :defcompile compiles dead functions
...
Problem: Vim9: :defcompile compiles dead functions.
Solution: Skip over dead functions.
2020-09-09 17:08:51 +02:00
Bram Moolenaar
95006e3dca
patch 8.2.1541: Vim9: cannot find function reference for s:Func
...
Problem: Vim9: cannot find function reference for s:Func.
Solution: Recognize <SNR> prefix. (closes #6805 )
2020-08-29 17:47:08 +02:00
Bram Moolenaar
ee8580e52e
patch 8.2.1534: Vim9: type error for argument type is not at call position
...
Problem: Vim9: type error for argument type is not at call position.
Solution: Set the context and stack after checking the arguments.
(issue #6785 )
2020-08-28 17:19:07 +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
66250c932e
patch 8.2.1491: Vim9: crash when compiling heredoc lines start with comment
...
Problem: Vim9: crash when compiling heredoc lines start with comment.
Solution: Skip over NULL pointers. Do not remove comment and empty lines
when fetching function lines. (closes #6743 )
2020-08-20 15:02:42 +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