Bram Moolenaar
f48b2fa33c
patch 8.2.2758: Vim9: wrong line number for autoload function with wrong name
...
Problem: Vim9: wrong line number for autoload function with wrong name.
Solution: Set and restore SOURCING_LNUM. (closes #8100 )
2021-04-12 22:02:36 +02:00
Bram Moolenaar
fed9e830fc
patch 8.2.2751: Coverity warns for using NULL pointer
...
Problem: Coverity warns for using NULL pointer.
Solution: Check for NULL in calling function.
2021-04-10 21:38:38 +02:00
Bram Moolenaar
87795939d0
patch 8.2.2746: check for duplicate arguments does not work
...
Problem: Check for duplicate arguments does not work.
Solution: Correct condition.
2021-04-10 18:21:30 +02:00
Bram Moolenaar
51e7e78de7
patch 8.2.2745: Vim9: missing part of the argument change
...
Problem: Vim9: missing part of the argument change.
Solution: Add missing changes.
2021-04-10 17:46:52 +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
767034c5b8
patch 8.2.2739: Vim9: a lambda accepts too many arguments at the script level
...
Problem: Vim9: a lambda accepts too many arguments at the script level.
Solution: Do not set uf_varargs in Vim9 script.
2021-04-09 17:24:52 +02:00
Bram Moolenaar
86cdb8a4bd
patch 8.2.2726: confusing error message with white space before comma
...
Problem: Confusing error message with white space before comma in the
arguments of a function declaration.
Solution: Give a specific error message. (closes #2235 )
2021-04-06 19:01:03 +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
79efa2e3b3
patch 8.2.2663: Vim9: leaking memory when inline function has an error
...
Problem: Vim9: leaking memory when inline function has an error.
Solution: Free the partially allocated function.
2021-03-27 15:40:11 +01:00
Bram Moolenaar
49f1e9ec3e
patch 8.2.2645: using inline function is not properly tested
...
Problem: Using inline function is not properly tested.
Solution: Add test cases, esp. for errors. Minor code improvements.
2021-03-22 20:49:02 +01:00
Bram Moolenaar
e98f60a591
patch 8.2.2642: Vim9: no clear error for wrong inline function
...
Problem: Vim9: no clear error for wrong inline function.
Solution: Check for something following the "{".
2021-03-22 18:22:30 +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
c970e4225b
patch 8.2.2614: Vim9: function is deleted while executing
...
Problem: Vim9: function is deleted while executing.
Solution: increment the call count, when more than zero do not delete the
function but mark it as dead. (closes #7977 )
2021-03-17 15:03:04 +01:00
Bram Moolenaar
608d78fb45
patch 8.2.2576: Vim9: defining a :func function checks for white space
...
Problem: Vim9: defining a :func function checks for white space after a
comma in the arguments.
Solution: Only check for white space in a :def function. (closes #7930 )
2021-03-06 22:33:12 +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
bc327ccc3d
patch 8.2.2544: Vim9: error for argument when checking for lambda
...
Problem: Vim9: error for argument when checking for lambda.
Solution: Respect the skip flag. (closes #7887 )
2021-02-23 12:05:46 +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
dc167465f8
patch 8.2.2536: Coverity complains about unchecked return value
...
Problem: Coverity complains about unchecked return value.
Solution: Add (void).
2021-02-20 20:26:16 +01:00
Bram Moolenaar
12d265315f
patch 8.2.2530: Vim9: not enough testing for profiling
...
Problem: Vim9: not enough testing for profiling.
Solution: Add a test with nested functions and a lambda. Fix profiling
for calling a compiled function.
2021-02-19 19:13:21 +01:00
Bram Moolenaar
31842cd077
patch 8.2.2505: Vim9: crash after defining function with invalid return type
...
Problem: Vim9: crash after defining function with invalid return type.
Solution: Clear function growarrays. Fix memory leak.
2021-02-12 22:10:21 +01:00
Bram Moolenaar
ba98fb54ae
patch 8.2.2486: Vim9: some errors for white space do not show context
...
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
2021-02-07 18:06:29 +01:00
Bram Moolenaar
4f53b79bf5
patch 8.2.2481: Vim9: confusing error when variable arguments have default
...
Problem: Vim9: confusing error when variable arguments have a default
value.
Solution: Give a specific error message. (closes #7793 )
2021-02-07 15:59:49 +01:00
Bram Moolenaar
c3fc75db02
patch 8.2.2480: Vim9: some errors for white space do not show context
...
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
2021-02-07 15:28:09 +01:00
Bram Moolenaar
7b6903f02c
patch 8.2.2456: Coverity warning for strcpy() into fixed size array
...
Problem: Coverity warning for strcpy() into fixed size array.
Solution: Add a type cast to hopefully silence the bogus warning.
2021-02-03 19:31:29 +01:00
Bram Moolenaar
0346b799fc
patch 8.2.2445: Vim9: no proper error for lambda missing return type
...
Problem: Vim9: no proper error for lambda missing return type.
Solution: Check for this error. (closes #7758 )
2021-01-31 22:18:29 +01:00
Bram Moolenaar
4efd994829
patch 8.2.2405: Vim9: no need to allow white space before "(" for :def
...
Problem: Vim9: no need to allow white space before "(" for :def.
Solution: Give an error for stray white space. (issue #7734 )
2021-01-24 21:14:20 +01:00
Bram Moolenaar
b204990346
patch 8.2.2400: Vim9: compiled functions are not profiled
...
Problem: Vim9: compiled functions are not profiled.
Solution: Add initial changes to profile compiled functions. Fix that a
script-local function was hard to debug.
2021-01-24 12:53:53 +01:00
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