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
2626d6a71c
patch 8.2.4310: Vim9: constant list and dict get a declaration type
...
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 )
2022-02-06 15:49:35 +00:00
Bram Moolenaar
2d3ac2e030
patch 8.2.4287: cannot assign empty list with type to variable with list type
...
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.
2022-02-03 12:34:05 +00:00
Bram Moolenaar
381692b6f1
patch 8.2.4286: Vim9: strict type checking after copy() and deepcopy()
...
Problem: Vim9: strict type checking after copy() and deepcopy().
Solution: Allow type to change after making a copy. (closes #9644 )
2022-02-02 20:01:27 +00:00
Bram Moolenaar
8133018f50
patch 8.2.4279: Vim9: cannot change item type with map() after range()
...
Problem: Vim9: cannot change item type with map() after range().
Solution: Split the return type in current type and declared type.
(closes #9665 )
2022-02-01 12:11:58 +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
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
62a099cc6d
patch 8.2.4034: Coverity warns for possibly using a NULL pointer
...
Problem: Coverity warns for possibly using a NULL pointer.
Solution: Check v_partial is not NULL.
2022-01-07 20:18:16 +00:00
Bram Moolenaar
48824e952f
patch 8.2.3998: asan error for adding zero to NULL
...
Problem: Asan error for adding zero to NULL.
Solution: Do not compute pointer if there are no entries.
2022-01-04 16:05:48 +00:00
Bram Moolenaar
078a46161e
patch 8.2.3996: Vim9: type checking lacks information about declared type
...
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.
2022-01-04 15:17:03 +00:00
Bram Moolenaar
114dbda785
patch 8.2.3991: Vim9: error when extending dict<any>
...
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 )
2022-01-03 12:28:03 +00:00
Bram Moolenaar
cfe3af284a
patch 8.2.3948: Vim9: failure with partial with unknown argument count
...
Problem: Vim9: failure with partial with unknown argument count.
Solution: Do not copy argument types if there aren't any.
2021-12-30 13:59:20 +00:00
Bram Moolenaar
13789bf103
patch 8.2.3945: Vim9: partial variable argument types are wrong
...
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 )
2021-12-30 13:29:00 +00:00
Bram Moolenaar
fa46ead31a
patch 8.2.3869: Vim9: type checking for "any" is inconsistent
...
Problem: Vim9: type checking for "any" is inconsistent.
Solution: Always use a runtime type check for using "any" for a more
specific type.
2021-12-22 13:18:39 +00:00
Bram Moolenaar
1b5f7a6202
patch 8.2.3868: Vim9: function test fails
...
Problem: Vim9: function test fails.
Solution: Add missing changes. Add test for earlier patch.
2021-12-21 13:30:42 +00:00
Bram Moolenaar
44a8977de4
patch 8.2.3844: Vim9: no type error if assigning func(number) to func(string)
...
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 )
2021-12-18 12:31:33 +00:00
Bram Moolenaar
e124204c4f
patch 8.2.3830: error messages are spread out
...
Problem: Error messages are spread out.
Solution: Move more error messages to errors.h.
2021-12-16 20:56:57 +00:00
Bram Moolenaar
464393a696
patch 8.2.3429: leaking memory when assigning to list or dict
...
Problem: Leaking memory when assigning to list or dict.
Solution: Free the list or dict type before overwriting it.
2021-09-11 23:07:44 +02:00
Bram Moolenaar
c8103b4c25
patch 8.2.3382: crash when getting the type of a NULL partial
...
Problem: Crash when getting the type of a NULL partial.
Solution: Check for NULL. (closes #8260 )
2021-08-28 14:58:44 +02:00
Bram Moolenaar
c66f645b80
patch 8.2.3359: Vim9: error for type when variable is not set
...
Problem: Vim9: error for type when variable is not set.
Solution: Give a specific error for a NULL function. (closes #8773 )
2021-08-19 21:08:30 +02:00
Bram Moolenaar
b56c4419d4
patch 8.2.3322: Vim9: checking type of dict does not check member type
...
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 )
2021-08-09 22:22:27 +02:00
Yegappan Lakshmanan
8ee52affe7
patch 8.2.3320: some local functions are not static
...
Problem: Some local functions are not static.
Solution: Add "static". Move snprintf() related code to strings.c.
(Yegappan Lakshmanan, closes #8734 )
2021-08-09 19:59:06 +02:00
Bram Moolenaar
f78da4f9d6
patch 8.2.3269: Vim9: wrong argument check for partial
...
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 )
2021-08-01 15:40:31 +02:00
Bram Moolenaar
60dc8274e9
patch 8.2.3249: Vim9: error for re-imported function with default argument
...
Problem: Vim9: error for re-imported function with default argument.
Solution: Do not check argument type if it is still unknown. (closes #8653 )
2021-07-29 22:48:54 +02:00
Bram Moolenaar
7a3fe3e180
patch 8.2.3200: Vim9: hard to guess where a type error is given
...
Problem: Vim9: hard to guess where a type error is given.
Solution: Add the function name where possible. (closes #8608 )
2021-07-22 14:58:47 +02:00
Bram Moolenaar
9da32e4d57
patch 8.2.3134: crash when using typename() on a function reference
...
Problem: Crash when using typename() on a function reference. (Naohiro Ono)
Solution: Initialize pointer to NULL. (closes #8531 )
2021-07-09 19:53:57 +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
b7480cd893
patch 8.2.3104: Vim9: unspecified function type causes type error
...
Problem: Vim9: unspecified function type causes type error.
Solution: Don't check type when min_argcount is negative. (issue #8492 )
2021-07-04 18:28:15 +02:00
Bram Moolenaar
7a40ff00ed
patch 8.2.3100: Vim9: no error when using type with unknown number of args
...
Problem: Vim9: no error when using type with unknown number of arguments.
Solution: Do not ignore argument count of -1. (closes #8492 )
2021-07-04 15:54:08 +02:00
Bram Moolenaar
831bdf8622
patch 8.2.3035: Vim9: crash when calling :def function with partial
...
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 )
2021-06-22 19:32:17 +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
f18332fb9e
patch 8.2.2842: Vim9: skip argument to searchpair() is not compiled
...
Problem: Vim9: skip argument to searchpair() is not compiled.
Solution: Add VAR_INSTR.
2021-05-07 17:55:55 +02:00
Bram Moolenaar
f2253963c2
patch 8.2.2759: Vim9: for loop infers type of loop variable
...
Problem: Vim9: for loop infers type of loop variable.
Solution: Do not get the member type. (closes #8102 )
2021-04-13 20:53:13 +02:00
Bram Moolenaar
108cf0153c
patch 8.2.2621: typval2type() cannot handle recursive structures
...
Problem: typval2type() cannot handle recursive structures.
Solution: Use copyID. (closes #7979 )
2021-03-18 22:15:04 +01:00
Bram Moolenaar
93e1cae739
patch 8.2.2600: Vim9: crash when putting an unknown type in a dictionary
...
Problem: Vim9: crash when putting an unknown type in a dictionary.
(Yegappan Lakshmanan)
Solution: Handle a NULL type pointer.
2021-03-13 21:24:56 +01:00
Bram Moolenaar
f785aa1354
patch 8.2.2501: not always clear where an error is reported
...
Problem: Not always clear where an error is reported.
Solution: Add the where_T structure and pass it around. (closes #7796 )
2021-02-11 21:19:34 +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
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
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
351ead09dd
patch 8.2.2362: Vim9: check of builtin function argument type is incomplete
...
Problem: Vim9: check of builtin function argument type is incomplete.
Solution: Use need_type() instead of check_arg_type().
2021-01-16 16:07:01 +01:00
Bram Moolenaar
a47e05f04a
patch 8.2.2339: cannot get the type of a value as a string
...
Problem: Cannot get the type of a value as a string.
Solution: Add typename().
2021-01-12 21:49:00 +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
e68b02a1c4
patch 8.2.2283: Vim9: crash when lambda has fewer arguments than expected
...
Problem: Vim9: crash when lambda has fewer arguments than expected.
Solution: Don't check arguments when already failed. (closes #7606 )
2021-01-03 13:09:51 +01:00
Bram Moolenaar
6b55377303
patch 8.2.2252: Vim9: crash when using lambda without return type in dict
...
Problem: Vim9: crash when using lambda without return type in dict.
Solution: Without a return type use t_unknown. (closes #7587 )
2020-12-31 13:31:23 +01:00
Bram Moolenaar
07a65d26e7
patch 8.2.2224: Vim9: crash if script reloaded with different variable type
...
Problem: Vim9: crash if script reloaded with different variable type.
Solution: Check the type when accessing the variable.
2020-12-26 20:09:15 +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
3868f59466
patch 8.2.2210: Vim9: allocating a type to set TTFLAG_BOOL_OK
...
Problem: Vim9: allocating a type to set TTFLAG_BOOL_OK.
Solution: Add t_number_bool.
2020-12-25 13:20:41 +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
193f6201b4
patch 8.2.1996: Vim9: invalid error for argument of extend()
...
Problem: Vim9: invalid error for argument of extend().
Solution: Check if the type could match. (closes #7299 )
2020-11-16 20:08:35 +01:00