| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Problem: Vim9: crash when using multiple funcref().
Solution: Check if varargs type is NULL. (closes #10467)
|
|
|
|
|
| |
Problem: Errors for functions are sometimes hard to read.
Solution: Use printable_func_name() in more places.
|
|
|
|
|
|
| |
Problem: Vim9: in :def function script var cannot be null.
Solution: Only initialize a script variable when not set to a null value.
(closes #10034)
|
|
|
|
|
| |
Problem: Vim9: using null values not sufficiently tested.
Solution: Add more tests. Fix uncovered problem.
|
|
|
|
|
|
| |
Problem: Vim9: comparing partial with function fails.
Solution: Support this comparison. Avoid a crash. (closes #9909)
Add more test cases.
|
|
|
|
|
| |
Problem: Vim9: cannot set variables to a null value.
Solution: Add null_list, null_job, etc.
|
|
|
|
|
|
| |
Problem: Using script-local function from the wrong script when using a
partial. (Yegappan Lakshmanan)
Solution: Include the script ID in the partial name.
|
|
|
|
|
|
|
| |
Problem: Vim9: constant list and dict get a declaration type other than
"any".
Solution: A constant list and dict have a declared member type "any".
(closes #9701)
|
|
|
|
|
|
| |
Problem: Cannot assign empty list with any list type to variable with
specific list type.
Solution: Use unknown list type for empty list if the specified type is any.
|
|
|
|
|
| |
Problem: Vim9: strict type checking after copy() and deepcopy().
Solution: Allow type to change after making a copy. (closes #9644)
|
|
|
|
|
|
| |
Problem: Vim9: cannot change item type with map() after range().
Solution: Split the return type in current type and declared type.
(closes #9665)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Problem: "cctx" argument of find_func_even_dead() is unused.
Solution: Remove the argument.
|
|
|
|
|
| |
Problem: Various code not used when features are disabled.
Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
|
|
|
|
|
| |
Problem: Coverity warns for possibly using a NULL pointer.
Solution: Check v_partial is not NULL.
|
|
|
|
|
| |
Problem: Asan error for adding zero to NULL.
Solution: Do not compute pointer if there are no entries.
|
|
|
|
|
|
|
| |
Problem: Vim9: type checking for list and dict lacks information about
declared type.
Solution: Add dv_decl_type and lv_decl_type. Refactor the type stack to
store two types in each entry.
|
|
|
|
|
|
|
| |
Problem: Vim9: error when extending dict<any> with another type that it was
initialized with.
Solution: Also set the type for dict<any> if the initializer has a more
specific type. (closes #9461)
|
|
|
|
|
| |
Problem: Vim9: failure with partial with unknown argument count.
Solution: Do not copy argument types if there aren't any.
|
|
|
|
|
|
|
| |
Problem: Vim9: partial variable argument types are wrong, leading to a
crash.
Solution: When adjusting the argument count also adjust the argument types.
(closes #9433)
|
|
|
|
|
|
| |
Problem: Vim9: type checking for "any" is inconsistent.
Solution: Always use a runtime type check for using "any" for a more
specific type.
|
|
|
|
|
| |
Problem: Vim9: function test fails.
Solution: Add missing changes. Add test for earlier patch.
|
|
|
|
|
|
|
| |
Problem: Vim9: no type error if assigning a value with type func(number) to
a variable of type func(string).
Solution: Use check_type_maybe(): return MAYBE if a runtime type check is
useful. (issue #8492)
|
|
|
|
|
| |
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
|
|
|
|
|
| |
Problem: Leaking memory when assigning to list or dict.
Solution: Free the list or dict type before overwriting it.
|
|
|
|
|
| |
Problem: Crash when getting the type of a NULL partial.
Solution: Check for NULL. (closes #8260)
|
|
|
|
|
| |
Problem: Vim9: error for type when variable is not set.
Solution: Give a specific error for a NULL function. (closes #8773)
|
|
|
|
|
|
| |
Problem: Vim9: checking type of dict does not check member type.
Solution: When getting the type of a typval use dv_type and lv_type.
(closes #8732)
|
|
|
|
|
|
| |
Problem: Some local functions are not static.
Solution: Add "static". Move snprintf() related code to strings.c.
(Yegappan Lakshmanan, closes #8734)
|
|
|
|
|
|
|
| |
Problem: Vim9: wrong argument check for partial. (Naohiro Ono)
Solution: Handle getting return type without arguments. Correct the minimal
number of arguments for what is included in the partial.
(closes #8667)
|
|
|
|
|
| |
Problem: Vim9: error for re-imported function with default argument.
Solution: Do not check argument type if it is still unknown. (closes #8653)
|
|
|
|
|
| |
Problem: Vim9: hard to guess where a type error is given.
Solution: Add the function name where possible. (closes #8608)
|
|
|
|
|
| |
Problem: Crash when using typename() on a function reference. (Naohiro Ono)
Solution: Initialize pointer to NULL. (closes #8531)
|
|
|
|
|
| |
Problem: Vim9: type of partial is wrong when it has arguments.
Solution: Subtract arguments from the count. (issue #8492)
|
|
|
|
|
| |
Problem: Vim9: unspecified function type causes type error.
Solution: Don't check type when min_argcount is negative. (issue #8492)
|
|
|
|
|
| |
Problem: Vim9: no error when using type with unknown number of arguments.
Solution: Do not ignore argument count of -1. (closes #8492)
|
|
|
|
|
|
|
| |
Problem: Vim9: crash when calling :def function with partial and return
type is not set.
Solution: When the return type is not set handle like the return type is
unknown. (closes #8422)
|
|
|
|
|
| |
Problem: Vim9: a compiled function cannot be debugged.
Solution: Add initial debugging support.
|
|
|
|
|
| |
Problem: Vim9: skip argument to searchpair() is not compiled.
Solution: Add VAR_INSTR.
|
|
|
|
|
| |
Problem: Vim9: for loop infers type of loop variable.
Solution: Do not get the member type. (closes #8102)
|
|
|
|
|
| |
Problem: typval2type() cannot handle recursive structures.
Solution: Use copyID. (closes #7979)
|
|
|
|
|
|
| |
Problem: Vim9: crash when putting an unknown type in a dictionary.
(Yegappan Lakshmanan)
Solution: Handle a NULL type pointer.
|
|
|
|
|
| |
Problem: Not always clear where an error is reported.
Solution: Add the where_T structure and pass it around. (closes #7796)
|
|
|
|
|
| |
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
|
|
|
|
|
| |
Problem: Vim9: some errors for white space do not show context.
Solution: Include the text at the error.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Problem: Vim9: check of builtin function argument type is incomplete.
Solution: Use need_type() instead of check_arg_type().
|
|
|
|
|
| |
Problem: Cannot get the type of a value as a string.
Solution: Add typename().
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
Problem: Vim9: crash when lambda has fewer arguments than expected.
Solution: Don't check arguments when already failed. (closes #7606)
|