Yegappan Lakshmanan
14113fdf9c
patch 9.0.1390: FOR_ALL_ macros are defined in an unexpected file
...
Problem: FOR_ALL_ macros are defined in an unexpected file.
Solution: Move FOR_ALL_ macros to macros.h. Add FOR_ALL_HASHTAB_ITEMS.
(Yegappan Lakshmanan, closes #12109 )
2023-03-07 17:13:51 +00:00
Bram Moolenaar
b1e32ac0c9
patch 9.0.1334: using tt_member for the class leads to mistakes
...
Problem: Using tt_member for the class leads to mistakes.
Solution: Add a separate tt_class field.
2023-02-21 12:38:51 +00:00
Bram Moolenaar
0917e86763
patch 9.0.1320: checking the type of a null object causes a crash
...
Problem: Checking the type of a null object causes a crash.
Solution: Don't try to get the class of a null object. (closes #12005 )
Handle error from calling a user function better.
2023-02-18 14:42:44 +00:00
Yegappan Lakshmanan
142ed77898
patch 9.0.1246: code is indented more than necessary
...
Problem: Code is indented more than necessary.
Solution: Use an early return where it makes sense. (Yegappan Lakshmanan,
closes #11887 )
2023-01-26 12:00:00 +00:00
Bram Moolenaar
47bba53bdb
patch 9.0.1224: cannot call a :def function with a number for float argument
...
Problem: Cannot call a :def function with a number for a float argument.
Solution: Accept a number as well, convert it to a float.
2023-01-20 18:49:46 +00:00
Bram Moolenaar
450c7a97d1
patch 9.0.1207: error when object type is expected but getting "any"
...
Problem: Error when object type is expected but getting "any".
Solution: When actual type is "any" use a runtime type check.
(closes #11826 )
2023-01-16 16:39:37 +00:00
Bram Moolenaar
32517c4c14
patch 9.0.1203: return type of values() is always list<any>
...
Problem: Return type of values() is always list<any>.
Solution: Use the member type if possible. (issue #11822 )
2023-01-15 18:17:12 +00:00
Bram Moolenaar
f450804e14
patch 9.0.1202: crash when iterating over list of objects
...
Problem: Crash when iterating over list of objects.
Solution: Do not make a copy of tt_member for object or class.
(closes #11823 )
2023-01-15 16:54:57 +00:00
Bram Moolenaar
3ce33b120c
patch 9.0.1187: test for using imported class fails
...
Problem: Test for using imported class fails.
Solution: Skip over rest of type.
2023-01-12 20:39:09 +00:00
Bram Moolenaar
a86655af84
patch 9.0.1185: using class from imported script not tested
...
Problem: Using class from imported script not tested.
Solution: Add tests. Implement what is missing.
2023-01-12 17:06:27 +00:00
Bram Moolenaar
a94bd9d939
patch 9.0.1184: interface of an object is not recognized when checking type
...
Problem: Interface of an object is not recognized when checking type.
Solution: Use the interface implemented by an object.
2023-01-12 15:01:32 +00:00
Bram Moolenaar
6481accd40
patch 9.0.1181: class inheritance and typing insufficiently tested
...
Problem: Class inheritance and typing insufficiently tested.
Solution: Add more tests. Implement missing behavior.
2023-01-11 21:14:17 +00:00
Mike Williams
dda3053121
patch 9.0.1163: compiler warning for implicit size_t/int conversion
...
Problem: Compiler warning for implicit size_t/int conversion.
Solution: Add a type cast. (Mike Williams, closes #11795 )
2023-01-09 14:18:13 +00:00
Bram Moolenaar
0cb3ca9f7a
patch 9.0.1156: tests fail because of a different error message
...
Problem: Tests fail because of a different error message.
Solution: Don't give an error if a type name can't be found.
2023-01-07 13:07:11 +00:00
Bram Moolenaar
eca2c5fff6
patch 9.0.1155: cannot use a class as a type
...
Problem: Cannot use a class as a type.
Solution: Accept a class and interface name as a type.
2023-01-07 12:08:41 +00:00
Bram Moolenaar
46ab925937
patch 9.0.1139: cannot create a new object in a compiled function
...
Problem: Cannot create a new object in a compiled function.
Solution: Compile the instructins to create a new object.
2023-01-03 14:01:21 +00:00
Bram Moolenaar
36818a9daa
patch 9.0.1138: crash when expecting varargs but it is something else
...
Problem: Crash when expecting varargs but it is something else.
Solution: Only use the member when the type is a list. (closes #11774 )
2023-01-03 12:33:26 +00:00
Bram Moolenaar
c6951a76a5
patch 9.0.1108: type error when using "any" type and adding to float
...
Problem: Type error when using "any" type and adding a number to a float.
Solution: Accept both a number and a float. (closes #11753 )
2022-12-29 20:56:24 +00:00
Bram Moolenaar
56310d38d8
patch 9.0.1104: invalid memory access when checking function argument types
...
Problem: Invalid memory access when checking function argument types.
Solution: Do not check beyond the number of arguments. (closes #11755 )
2022-12-27 17:25:05 +00:00
Bram Moolenaar
74e1274edf
patch 9.0.1054: object member can't get type from initializer
...
Problem: Object member can't get type from initializer.
Solution: If there is no type specified try to use the type of the
initializer. Check for a valid type.
2022-12-13 21:14:28 +00:00
Bram Moolenaar
692fe0889c
patch 9.0.1052: using freed memory on exit when EXITFREE is defined
...
Problem: Using freed memory on exit when EXITFREE is defined.
Solution: Make a deep copy of the type. Make sure TTFLAG_STATIC is not set
in the copy.
2022-12-13 13:42:37 +00:00
Bram Moolenaar
6342e2c5a6
patch 9.0.1050: using freed memory when assigning to variable twice
...
Problem: Using freed memory when assigning to variable twice.
Solution: Make copy of the list type. (closes #11691 )
2022-12-12 18:56:32 +00:00
Bram Moolenaar
ffdaca9e6f
patch 9.0.1041: cannot define a method in a class
...
Problem: Cannot define a method in a class.
Solution: Implement defining an object method. Make calling an object
method work.
2022-12-09 21:41:48 +00:00
Bram Moolenaar
00b28d6c23
patch 9.0.1031: Vim9 class is not implemented yet
...
Problem: Vim9 class is not implemented yet.
Solution: Add very basic class support.
2022-12-08 15:32:33 +00:00
Bram Moolenaar
330d64d32c
patch 9.0.0703: failing check for argument type for const any
...
Problem: Failing check for argument type for const any.
Solution: Check for any type properly. (closes #11316 )
2022-10-09 12:55:33 +01:00
Bram Moolenaar
d0121c63cf
patch 9.0.0628: Coverity warns for not checking return value
...
Problem: Coverity warns for not checking return value.
Solution: Check the return value and simplify the code.
2022-09-30 12:00:06 +01:00
Bram Moolenaar
ac38ec7c7f
patch 9.0.0624: leaking argument type array
...
Problem: Leaking argument type array.
Solution: Add allocated memory to type_gap.
2022-09-29 20:23:35 +01:00
Bram Moolenaar
fa1039760e
patch 9.0.0623: error for modifying a const is not detected at compile time
...
Problem: Error for modifying a const is not detected at compile time.
Solution: Add TTFLAG_CONST and check for it in add() and extend().
2022-09-29 19:14:42 +01:00
Bram Moolenaar
73e28dcc61
patch 9.0.0491: no good reason to build without the float feature
...
Problem: No good reason to build without the float feature.
Solution: Remove configure check for float and "#ifdef FEAT_FLOAT".
2022-09-17 21:08:33 +01:00
Bram Moolenaar
3e8b7a6056
patch 9.0.0477: missing dependency may cause crashes on incomplete build
...
Problem: Missing dependency may cause crashes on incomplete build.
Solution: Add dependency.
2022-09-16 12:28:34 +01:00
Bram Moolenaar
62e0e2e54b
patch 9.0.0229: Vim9: error message for missing type is not clear
...
Problem: Vim9: error message for missing type is not clear.
Solution: Mention the context. (issue #10944 )
2022-08-20 12:07:58 +01:00
Bram Moolenaar
31d9948e3a
patch 8.2.5026: Vim9: a few lines not covered by tests
...
Problem: Vim9: a few lines not covered by tests.
Solution: Delete dead code. Add a few test cases. make "12->func()" work.
2022-05-26 22:24:43 +01:00
Bram Moolenaar
bce69d65dd
patch 8.2.4998: Vim9: crash when using multiple funcref()
...
Problem: Vim9: crash when using multiple funcref().
Solution: Check if varargs type is NULL. (closes #10467 )
2022-05-22 13:45:52 +01:00
Bram Moolenaar
a6c18d38ca
patch 8.2.4657: errors for functions are sometimes hard to read
...
Problem: Errors for functions are sometimes hard to read.
Solution: Use printable_func_name() in more places.
2022-03-31 20:02:56 +01:00
Bram Moolenaar
859cc21c6b
patch 8.2.4642: Vim9: in :def function script var cannot be null
...
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 )
2022-03-28 15:22:35 +01:00
Bram Moolenaar
badf04f5c2
patch 8.2.4554: Vim9: using null values not sufficiently tested
...
Problem: Vim9: using null values not sufficiently tested.
Solution: Add more tests. Fix uncovered problem.
2022-03-12 21:28:22 +00:00
Bram Moolenaar
ed0c62e7b1
patch 8.2.4529: Vim9: comparing partial with function fails
...
Problem: Vim9: comparing partial with function fails.
Solution: Support this comparison. Avoid a crash. (closes #9909 )
Add more test cases.
2022-03-08 19:43:55 +00:00
Bram Moolenaar
8acb9cc620
patch 8.2.4526: Vim9: cannot set variables to a null value
...
Problem: Vim9: cannot set variables to a null value.
Solution: Add null_list, null_job, etc.
2022-03-08 13:18:55 +00:00
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