summaryrefslogtreecommitdiff
path: root/src/vim9type.c
Commit message (Collapse)AuthorAgeFilesLines
* patch 8.2.4998: Vim9: crash when using multiple funcref()v8.2.4998Bram Moolenaar2022-05-221-1/+5
| | | | | Problem: Vim9: crash when using multiple funcref(). Solution: Check if varargs type is NULL. (closes #10467)
* patch 8.2.4657: errors for functions are sometimes hard to readv8.2.4657Bram Moolenaar2022-03-311-2/+2
| | | | | Problem: Errors for functions are sometimes hard to read. Solution: Use printable_func_name() in more places.
* patch 8.2.4642: Vim9: in :def function script var cannot be nullv8.2.4642Bram Moolenaar2022-03-281-0/+4
| | | | | | 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)
* patch 8.2.4554: Vim9: using null values not sufficiently testedv8.2.4554Bram Moolenaar2022-03-121-0/+13
| | | | | Problem: Vim9: using null values not sufficiently tested. Solution: Add more tests. Fix uncovered problem.
* patch 8.2.4529: Vim9: comparing partial with function failsv8.2.4529Bram Moolenaar2022-03-081-0/+2
| | | | | | Problem: Vim9: comparing partial with function fails. Solution: Support this comparison. Avoid a crash. (closes #9909) Add more test cases.
* patch 8.2.4526: Vim9: cannot set variables to a null valuev8.2.4526Bram Moolenaar2022-03-081-12/+9
| | | | | Problem: Vim9: cannot set variables to a null value. Solution: Add null_list, null_job, etc.
* patch 8.2.4429: using script-local function from the wrong scriptv8.2.4429Bram Moolenaar2022-02-211-1/+1
| | | | | | Problem: Using script-local function from the wrong script when using a partial. (Yegappan Lakshmanan) Solution: Include the script ID in the partial name.
* patch 8.2.4310: Vim9: constant list and dict get a declaration typev8.2.4310Bram Moolenaar2022-02-061-9/+0
| | | | | | | 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)
* patch 8.2.4287: cannot assign empty list with type to variable with list typev8.2.4287Bram Moolenaar2022-02-031-1/+5
| | | | | | 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.
* patch 8.2.4286: Vim9: strict type checking after copy() and deepcopy()v8.2.4286Bram Moolenaar2022-02-021-0/+65
| | | | | Problem: Vim9: strict type checking after copy() and deepcopy(). Solution: Allow type to change after making a copy. (closes #9644)
* patch 8.2.4279: Vim9: cannot change item type with map() after range()v8.2.4279Bram Moolenaar2022-02-011-2/+22
| | | | | | Problem: Vim9: cannot change item type with map() after range(). Solution: Split the return type in current type and declared type. (closes #9665)
* patch 8.2.4114: Vim9: type checking for a funcref does not work for methodv8.2.4114Bram Moolenaar2022-01-161-5/+18
| | | | | | 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.
* patch 8.2.4086: "cctx" argument of find_func_even_dead() is unusedv8.2.4086Bram Moolenaar2022-01-131-1/+1
| | | | | Problem: "cctx" argument of find_func_even_dead() is unused. Solution: Remove the argument.
* patch 8.2.4038: various code not used when features are disabledv8.2.4038Dominique Pelle2022-01-081-6/+0
| | | | | Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pellé, closes #9491)
* patch 8.2.4034: Coverity warns for possibly using a NULL pointerv8.2.4034Bram Moolenaar2022-01-071-1/+1
| | | | | Problem: Coverity warns for possibly using a NULL pointer. Solution: Check v_partial is not NULL.
* patch 8.2.3998: asan error for adding zero to NULLv8.2.3998Bram Moolenaar2022-01-041-1/+2
| | | | | Problem: Asan error for adding zero to NULL. Solution: Do not compute pointer if there are no entries.
* patch 8.2.3996: Vim9: type checking lacks information about declared typev8.2.3996Bram Moolenaar2022-01-041-10/+82
| | | | | | | 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.
* patch 8.2.3991: Vim9: error when extending dict<any>v8.2.3991Bram Moolenaar2022-01-031-16/+35
| | | | | | | 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)
* patch 8.2.3948: Vim9: failure with partial with unknown argument countv8.2.3948Bram Moolenaar2021-12-301-9/+12
| | | | | Problem: Vim9: failure with partial with unknown argument count. Solution: Do not copy argument types if there aren't any.
* patch 8.2.3945: Vim9: partial variable argument types are wrongv8.2.3945Bram Moolenaar2021-12-301-0/+15
| | | | | | | 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)
* patch 8.2.3869: Vim9: type checking for "any" is inconsistentv8.2.3869Bram Moolenaar2021-12-221-6/+20
| | | | | | Problem: Vim9: type checking for "any" is inconsistent. Solution: Always use a runtime type check for using "any" for a more specific type.
* patch 8.2.3868: Vim9: function test failsv8.2.3868Bram Moolenaar2021-12-211-2/+5
| | | | | Problem: Vim9: function test fails. Solution: Add missing changes. Add test for earlier patch.
* patch 8.2.3844: Vim9: no type error if assigning func(number) to func(string)v8.2.3844Bram Moolenaar2021-12-181-6/+43
| | | | | | | 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)
* patch 8.2.3830: error messages are spread outv8.2.3830Bram Moolenaar2021-12-161-3/+3
| | | | | Problem: Error messages are spread out. Solution: Move more error messages to errors.h.
* patch 8.2.3429: leaking memory when assigning to list or dictv8.2.3429Bram Moolenaar2021-09-111-1/+3
| | | | | Problem: Leaking memory when assigning to list or dict. Solution: Free the list or dict type before overwriting it.
* patch 8.2.3382: crash when getting the type of a NULL partialv8.2.3382Bram Moolenaar2021-08-281-2/+3
| | | | | Problem: Crash when getting the type of a NULL partial. Solution: Check for NULL. (closes #8260)
* patch 8.2.3359: Vim9: error for type when variable is not setv8.2.3359Bram Moolenaar2021-08-191-0/+10
| | | | | Problem: Vim9: error for type when variable is not set. Solution: Give a specific error for a NULL function. (closes #8773)
* patch 8.2.3322: Vim9: checking type of dict does not check member typev8.2.3322Bram Moolenaar2021-08-091-2/+6
| | | | | | 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)
* patch 8.2.3320: some local functions are not staticv8.2.3320Yegappan Lakshmanan2021-08-091-1/+1
| | | | | | Problem: Some local functions are not static. Solution: Add "static". Move snprintf() related code to strings.c. (Yegappan Lakshmanan, closes #8734)
* patch 8.2.3269: Vim9: wrong argument check for partialv8.2.3269Bram Moolenaar2021-08-011-0/+5
| | | | | | | 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)
* patch 8.2.3249: Vim9: error for re-imported function with default argumentv8.2.3249Bram Moolenaar2021-07-291-5/+9
| | | | | Problem: Vim9: error for re-imported function with default argument. Solution: Do not check argument type if it is still unknown. (closes #8653)
* patch 8.2.3200: Vim9: hard to guess where a type error is givenv8.2.3200Bram Moolenaar2021-07-221-10/+22
| | | | | Problem: Vim9: hard to guess where a type error is given. Solution: Add the function name where possible. (closes #8608)
* patch 8.2.3134: crash when using typename() on a function referencev8.2.3134Bram Moolenaar2021-07-091-1/+1
| | | | | Problem: Crash when using typename() on a function reference. (Naohiro Ono) Solution: Initialize pointer to NULL. (closes #8531)
* patch 8.2.3105: Vim9: type of partial is wrong when it has argumentsv8.2.3105Bram Moolenaar2021-07-041-0/+13
| | | | | Problem: Vim9: type of partial is wrong when it has arguments. Solution: Subtract arguments from the count. (issue #8492)
* patch 8.2.3104: Vim9: unspecified function type causes type errorv8.2.3104Bram Moolenaar2021-07-041-0/+1
| | | | | Problem: Vim9: unspecified function type causes type error. Solution: Don't check type when min_argcount is negative. (issue #8492)
* patch 8.2.3100: Vim9: no error when using type with unknown number of argsv8.2.3100Bram Moolenaar2021-07-041-5/+9
| | | | | Problem: Vim9: no error when using type with unknown number of arguments. Solution: Do not ignore argument count of -1. (closes #8492)
* patch 8.2.3035: Vim9: crash when calling :def function with partialv8.2.3035Bram Moolenaar2021-06-221-2/+2
| | | | | | | 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)
* patch 8.2.2985: Vim9: a compiled function cannot be debuggedv8.2.2985Bram Moolenaar2021-06-131-1/+1
| | | | | Problem: Vim9: a compiled function cannot be debugged. Solution: Add initial debugging support.
* patch 8.2.2842: Vim9: skip argument to searchpair() is not compiledv8.2.2842Bram Moolenaar2021-05-071-0/+2
| | | | | Problem: Vim9: skip argument to searchpair() is not compiled. Solution: Add VAR_INSTR.
* patch 8.2.2759: Vim9: for loop infers type of loop variablev8.2.2759Bram Moolenaar2021-04-131-10/+16
| | | | | Problem: Vim9: for loop infers type of loop variable. Solution: Do not get the member type. (closes #8102)
* patch 8.2.2621: typval2type() cannot handle recursive structuresv8.2.2621Bram Moolenaar2021-03-181-12/+20
| | | | | Problem: typval2type() cannot handle recursive structures. Solution: Use copyID. (closes #7979)
* patch 8.2.2600: Vim9: crash when putting an unknown type in a dictionaryv8.2.2600Bram Moolenaar2021-03-131-2/+4
| | | | | | Problem: Vim9: crash when putting an unknown type in a dictionary. (Yegappan Lakshmanan) Solution: Handle a NULL type pointer.
* patch 8.2.2501: not always clear where an error is reportedv8.2.2501Bram Moolenaar2021-02-111-14/+37
| | | | | Problem: Not always clear where an error is reported. Solution: Add the where_T structure and pass it around. (closes #7796)
* patch 8.2.2486: Vim9: some errors for white space do not show contextv8.2.2486Bram Moolenaar2021-02-071-2/+3
| | | | | Problem: Vim9: some errors for white space do not show context. Solution: Include the text at the error.
* patch 8.2.2480: Vim9: some errors for white space do not show contextv8.2.2480Bram Moolenaar2021-02-071-2/+4
| | | | | Problem: Vim9: some errors for white space do not show context. Solution: Include the text at the error.
* patch 8.2.2400: Vim9: compiled functions are not profiledv8.2.2400Bram Moolenaar2021-01-241-1/+2
| | | | | | 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.
* patch 8.2.2362: Vim9: check of builtin function argument type is incompletev8.2.2362Bram Moolenaar2021-01-161-15/+5
| | | | | Problem: Vim9: check of builtin function argument type is incomplete. Solution: Use need_type() instead of check_arg_type().
* patch 8.2.2339: cannot get the type of a value as a stringv8.2.2339Bram Moolenaar2021-01-121-0/+25
| | | | | Problem: Cannot get the type of a value as a string. Solution: Add typename().
* patch 8.2.2306: Vim9: when using function reference type is not checkedv8.2.2306Bram Moolenaar2021-01-061-0/+40
| | | | | | 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)
* patch 8.2.2283: Vim9: crash when lambda has fewer arguments than expectedv8.2.2283Bram Moolenaar2021-01-031-2/+3
| | | | | Problem: Vim9: crash when lambda has fewer arguments than expected. Solution: Don't check arguments when already failed. (closes #7606)