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
Yegappan Lakshmanan
4dc24eb5ad
patch 8.2.3756: might crash when callback is not valid
...
Problem: might crash when callback is not valid.
Solution: Check for valid callback. (Yegappan Lakshmanan, closes #9293 )
2021-12-07 12:23:57 +00:00
Bram Moolenaar
2336c376d5
patch 8.2.3753: Vim9: function unreferenced while called is never deleted
...
Problem: Vim9: function unreferenced while called is never deleted.
Solution: Delete a function when no longer referenced.
2021-12-06 15:06:54 +00:00
Bram Moolenaar
40bcec1bac
patch 8.2.3750: error messages are everywhere
...
Problem: Error messages are everywhere.
Solution: Move more error messages to errors.h and adjust the names.
2021-12-05 22:19:27 +00:00
Yegappan Lakshmanan
8658c759f0
patch 8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
...
Problem: Cannot use a lambda for 'completefunc' and 'omnifunc'.
Solution: Implement lambda support. (Yegappan Lakshmanan, closes #9257 )
2021-12-03 11:09:29 +00:00
Bram Moolenaar
eba3b7f664
patch 8.2.3705: cannot pass a lambda name to function() or funcref()
...
Problem: Cannot pass a lambda name to function() or funcref(). (Yegappan
Lakshmanan)
Solution: Handle a lambda name differently.
2021-11-30 18:25:08 +00:00
Bram Moolenaar
38453528c3
patch 8.2.3692: Vim9: cannot use :func inside a :def function
...
Problem: Vim9: cannot use :func inside a :def function.
Solution: Make it work.
2021-11-28 22:00:12 +00:00
Bram Moolenaar
d604d78e7b
patch 8.2.3634: error for already defined function uses wrong line number
...
Problem: Error for already defined function uses wrong line number.
Solution: Set SOURCING_LNUM before giving the error message. (closes #9085 )
2021-11-20 21:46:20 +00:00
Bram Moolenaar
a755fdbe80
patch 8.2.3633: Vim9: line number of lambda is off by one
...
Problem: Vim9: line number of lambda is off by one.
Solution: Add one to the line number. (closes #9083 )
2021-11-20 21:35:41 +00:00
Bram Moolenaar
844fb64a60
patch 8.2.3560: using freed memory with lambda
...
Problem: Using freed memory with lambda.
Solution: Do not free lines early, keep them until the expression is
finished.
2021-10-23 13:32:30 +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
1d34189ecb
patch 8.2.3448: :endtry after function call that throws not found
...
Problem: :endtry after function call that throws not found.
Solution: Do check for following :endtry if an exception is being thrown.
(closes #8889 )
2021-09-18 15:25:52 +02:00
Bram Moolenaar
36f691f5f1
patch 8.2.3416: second error is reported while exception is being thrown
...
Problem: Second error is reported while exception is being thrown.
Solution: Do not check for trailing characters when already aborting.
(closes #8842 )
2021-09-08 15:33:30 +02:00
Bram Moolenaar
ddfc05100a
patch 8.2.3408: can delete a numbered function
...
Problem: Can delete a numbered function. (Naohiro Ono)
Solution: Disallow deleting a numbered function. (closes #8760 )
2021-09-06 20:56:56 +02:00
Bram Moolenaar
01dd6c3732
patch 8.2.3404: Vim9: no error for white space before "("
...
Problem: Vim9: no error for white space before "(".
Solution: Give an error, like in a compiled function.
2021-09-05 16:36:23 +02:00
naohiro ono
9aecf79c45
patch 8.2.3383: Vim9: completion for :disassemble adds parenthesis
...
Problem: Vim9: completion for :disassemble adds parenthesis.
Solution: Don't add parenthesis. (Naohiro Ono, closes #8802 )
2021-08-28 15:56:06 +02:00
Bram Moolenaar
4bba16d252
patch 8.2.3352: Vim9: error for nested :enddef has wrong line number
...
Problem: Vim9: error for nested :enddef has wrong line number.
Solution: Compute the line number.
2021-08-15 19:28:05 +02:00
Bram Moolenaar
33ea9fd4d8
patch 8.2.3317: Vim9: No error for missing white space before return type
...
Problem: Vim9: No error for missing white space before return type.
Solution: Check for white space. (closes #8733 )
2021-08-08 19:07:37 +02:00
Bram Moolenaar
63b9173693
patch 8.2.3297: cannot use all commands inside a {} block
...
Problem: Cannot use all commands inside a {} block after :command and
:autocmd.
Solution: Do consider \n to separate commands. (closes #8620 )
2021-08-05 20:40:03 +02:00
Bram Moolenaar
1321257317
patch 8.2.3273: autocmd test fails
...
Problem: Autocmd test fails.
Solution: Require white space before the "{" that starts a block.
2021-08-01 22:01:30 +02:00
Bram Moolenaar
e4db17fb6e
patch 8.2.3271: Vim9: cannot use :command or :au with block in :def function
...
Problem: Vim9: cannot use :command or :au with a block in a :def function.
Solution: Recognize the start of the block.
2021-08-01 21:19:43 +02:00
Bram Moolenaar
6e850a6900
patch 8.2.3241: Vim9: memory leak when function reports an error
...
Problem: Vim9: memory leak when function reports an error.
Solution: Clear the return value.
2021-07-28 22:21:23 +02:00
Bram Moolenaar
327d3ee455
patch 8.2.3237: when a builtin function gives an error processing continues
...
Problem: When a builtin function gives an error processing continues.
Solution: In Vim9 script return FAIL in get_func_tv().
2021-07-28 19:34:14 +02:00
Bram Moolenaar
6868634abd
patch 8.2.3235: cannot use lambda in {} block in user command
...
Problem: Cannot use lambda in {} block in user command. (Martin Tournoij)
Solution: Do not go over the end of the lambda.
2021-07-28 15:54:54 +02:00
Bram Moolenaar
2eb6fc3b52
patch 8.2.3216: Vim9: crash when using variable in a loop at script level
...
Problem: Vim9: crash when using variable in a loop at script level.
Solution: Do not clear the variable if a function was defined.
Do not create a new entry in sn_var_vals every time.
(closes #8628 )
2021-07-25 14:13:53 +02:00
Bram Moolenaar
e29a27f6f8
patch 8.2.3190: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move error messages to errors.h and give them a clear name.
2021-07-20 21:07:36 +02:00
Bram Moolenaar
ac2cd2b08f
patch 8.2.3185: Vim9: start of inline function found in comment line
...
Problem: Vim9: start of inline function found in comment line.
Solution: Do not check for inline function in comment line. (closes #8589 )
2021-07-19 21:04:23 +02:00
Bram Moolenaar
f5f1b59d3b
patch 8.2.3171: another illegal memory access in test
...
Problem: Another illegal memory access in test.
Solution: Check pointer is after the start of the line.
2021-07-15 23:44:54 +02:00
Bram Moolenaar
d8cee76b49
patch 8.2.3170: Illegal memory access in test
...
Problem: Illegal memory access in test.
Solution: Check pointer is not before the start of the line.
2021-07-15 23:15:59 +02:00
Bram Moolenaar
5245beb37c
patch 8.2.3169: Vim9: cannot handle nested inline function
...
Problem: Vim9: cannot handle nested inline function.
Solution: Check for nested inline function. (closes #8575 )
2021-07-15 22:03:50 +02:00
Bram Moolenaar
c967d57aa9
patch 8.2.3129: Vim9: imported uninitialized list does not get type checked
...
Problem: Vim9: imported uninitialized list does not get type checked.
Solution: Get type from imported variable.
2021-07-08 21:38:50 +02:00
Bram Moolenaar
f055d45023
patch 8.2.3128: Vim9: uninitialzed list does not get type checked
...
Problem: Vim9: uninitialzed list does not get type checked.
Solution: Set the type when initializing the variable. (closes #8529 )
2021-07-08 20:57:24 +02:00
Bram Moolenaar
22f85d0459
patch 8.2.3107: Vim9: error for arguments while type didn't specify arguments
...
Problem: Vim9: error for arguments while type didn't specify arguments.
Solution: Do not update that type to check when no argument count is
specified. (closes #8492 )
2021-07-04 23:29:30 +02:00
Bram Moolenaar
97f227d9c9
patch 8.2.3105: Vim9: type of partial is wrong when it has arguments
...
Problem: Vim9: type of partial is wrong when it has arguments.
Solution: Subtract arguments from the count. (issue #8492 )
2021-07-04 20:20:52 +02:00
Bram Moolenaar
20cc528320
patch 8.2.3089: garbage collection has useless code
...
Problem: Garbage collection has useless code.
Solution: Bail out when aborting. (closes #8504 )
2021-07-03 16:33:16 +02:00
Bram Moolenaar
108010aa47
patch 8.2.3069: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move some error messages to errors.h. Use clearer names.
2021-06-27 22:03:33 +02:00
Bram Moolenaar
98f9a5f4cb
patch 8.2.3060: Vim9: cannot use ternary operator in parenthesis
...
Problem: Vim9: cannot use ternary operator in parenthesis.
Solution: Do not use "=~" for a default argument value. (closes #8462 )
2021-06-26 22:22:38 +02:00
Bram Moolenaar
e3ffaa6b7c
patch 8.2.3059: Vim9: memory leak when using lambda
...
Problem: Vim9: memory leak when using lambda.
Solution: Do not store the default value strings when skipping.
2021-06-26 22:17:35 +02:00
Bram Moolenaar
015cf10311
patch 8.2.3058: Vim9: cannot use ternary operator in parenthesis
...
Problem: Vim9: cannot use ternary operator in parenthesis.
Solution: Do not use "==" for a default argument value. (closes #8462 )
2021-06-26 21:52:02 +02:00
Bram Moolenaar
14ded11fca
patch 8.2.3056: Vim9: using default value in lambda gives confusing error
...
Problem: Vim9: using default value in lambda gives confusing error.
Solution: Pass "default_args" on the first pass to get the arguments.
(closes #8455 )
2021-06-26 19:25:49 +02:00
Bram Moolenaar
22f17a29cd
patch 8.2.3031: no error if a function name starts with an underscore
...
Problem: No error if a function name starts with an underscore. (Naohiro
Ono)
Solution: In Vim9 script disallow a function name starting with an
underscore, as is mentioned in the help. (closes #8414 )
2021-06-21 20:48:58 +02:00
Bram Moolenaar
e99d422bbd
patch 8.2.2985: Vim9: a compiled function cannot be debugged
...
Problem: Vim9: a compiled function cannot be debugged.
Solution: Add initial debugging support.
2021-06-13 14:01:26 +02:00
Bram Moolenaar
a993153538
patch 8.2.2983: Vim9: an inline function requires specifying the return type
...
Problem: Vim9: an inline function requires specifying the return type.
Solution: Make the return type optional.
2021-06-12 15:58:16 +02:00
Bram Moolenaar
2067733b5c
patch 8.2.2951: Vim9: cannot use heredoc for :python, :lua, etc.
...
Problem: Vim9: cannot use heredoc in :def function for :python, :lua, etc.
Solution: Concatenate the heredoc lines and pass them in the ISN_EXEC_SPLIT
instruction.
2021-06-06 17:02:53 +02:00
Bram Moolenaar
15bbb8f4f3
patch 8.2.2882: Vim9: memory leak when lambda has an error
...
Problem: Vim9: memory leak when lambda has an error.
Solution: Free the list of argument types on failure.
2021-05-24 15:45:29 +02:00
Bram Moolenaar
ecb664501d
patch 8.2.2866: Vim9: memory leak when using inline function
...
Problem: Vim9: memory leak when using inline function.
Solution: Remember what strings to free.
2021-05-18 15:09:18 +02:00
Bram Moolenaar
d87c21a918
patch 8.2.2865: skipping over function body fails
...
Problem: Skipping over function body fails.
Solution: Do not define the function when skipping.
2021-05-18 13:40:33 +02:00
Bram Moolenaar
074f84c01f
patch 8.2.2864: Vim9: crash when using inline function
...
Problem: Vim9: crash when using inline function.
Solution: Check for NULL pointer. Make using inline function work inside
lambda. (closes #8217 )
2021-05-18 11:47:44 +02:00
Bram Moolenaar
b47bed2f7a
patch 8.2.2764: memory leak when default function argument is allocated
...
Problem: Memory leak when default function argument is allocated.
Solution: Free the expression result.
2021-04-14 17:06:43 +02:00